Issue 5816 in pharo: Nautilus freezes the VM when halting a test

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 5816 in pharo: Nautilus freezes the VM when halting a test

pharo
Status: Accepted
Owner: marianopeck
CC: [hidden email]
Labels: Type-Nautilus Milestone-2.0

New issue 5816 by marianopeck: Nautilus freezes the VM when halting a test
http://code.google.com/p/pharo/issues/detail?id=5816

Hi Ben. Our experiments with the semaphores in Nautilus and tests may have  
a bug ;)

Steps to reproduce:

1) Go to TraitTest >> testOrigin.
2) Put a "self halt" just after the comment "For TR2"
3) cmd+t on the test
4) feeze.

However, if from a workspace you do:

TraitTest new setUp; testOrigin

it halts perfect.

Can you reproduce it?


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5816 in pharo: Nautilus freezes the VM when halting a test

pharo
Updates:
        Status: FixToInclude

Comment #1 on issue 5816 by [hidden email]: Nautilus freezes the VM  
when halting a test
http://code.google.com/p/pharo/issues/detail?id=5816

Nautilus-BenjaminVanRyseghem.266 in PharoInbox
Also in the last ConfigurationOfNautilus.

Mariano, could you have a look? It works in my image but, 2 brains are  
better than one (especially if the one is mine ^^)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5816 in pharo: Nautilus freezes the VM when halting a test

pharo
Updates:
        Status: FixReviewNeeded

Comment #2 on issue 5816 by marianopeck: Nautilus freezes the VM when  
halting a test
http://code.google.com/p/pharo/issues/detail?id=5816

Ben, I take a quick look and there is something I am not sure about. I have  
to leave now, but I will put the status as review needed. I will give you  
more feedback later on.

thanks!


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5816 in pharo: Nautilus freezes the VM when halting a test

pharo

Comment #3 on issue 5816 by [hidden email]: Nautilus freezes the VM  
when halting a test
http://code.google.com/p/pharo/issues/detail?id=5816

Ok, keep me in touch :)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5816 in pharo: Nautilus freezes the VM when halting a test

pharo

Comment #4 on issue 5816 by marianopeck: Nautilus freezes the VM when  
halting a test
http://code.google.com/p/pharo/issues/detail?id=5816

Ben, your change "works", I mean, it does not freeze. However, I am not  
happy with the result. You consider the halt as a failure, you bring up the  
yellow popup. The you proceed and you don't know what happened with the  
test.

What should happen when you put a halt is:

1) no yellow popup is raised.
2) the halt just opens the debugger as if nothing would happen.
3) Then, if you cancel the debugger. You cancel. Nothing appears. If you  
follow with the test (and you finish it) then or failure or error.

Sorry for not being able to help more. I am trying to code what I want but  
I was not yet sucessfull :(


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5816 in pharo: Nautilus freezes the VM when halting a test

pharo

Comment #5 on issue 5816 by [hidden email]: Nautilus freezes the VM  
when halting a test
http://code.google.com/p/pharo/issues/detail?id=5816

I am sorry, but I do not agree in the sense that tests should be able to be  
run without any people behind the keyboard (and moreover, without that,  
Jenkins will hang).

For me, a Halt in a test means that the test is not correct. I consider  
that a test with an halt in it can't be successful in the sense a being  
able to run test in an headless image. I know that for debugging it is more  
difficult but even.




_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5816 in pharo: Nautilus freezes the VM when halting a test

pharo

Comment #6 on issue 5816 by [hidden email]: Nautilus freezes the  
VM when halting a test
http://code.google.com/p/pharo/issues/detail?id=5816

But Nautilus is not mented to be used by Jenkins but by people :/.  Anyway,  
sometimes I want that behavior and sometimes I don't, so I do not know what  
is the best.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5816 in pharo: Nautilus freezes the VM when halting a test

pharo

Comment #7 on issue 5816 by marianopeck: Nautilus freezes the VM when  
halting a test
http://code.google.com/p/pharo/issues/detail?id=5816

"I am sorry, but I do not agree in the sense that tests should be able to  
be run without any people behind the keyboard"

But we are talking about Nautilus, that is, there is a user behind.

"For me, a Halt in a test means that the test is not correct."

Normally not, it just means you are debugging the test.


I agree with Guille. Nautilus is ment for DEVELOPERS. Not jenkins. For me a  
hlat means I just want to debug. Nothing else. Moreover, Jenkins does not  
use Nautilus at all.

In my view, the halt should do with Nautilus the same as if execute this in  
a workspace:

MyClassTest new setUp; testXXX; tearDown.




_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5816 in pharo: Nautilus freezes the VM when halting a test

pharo

Comment #8 on issue 5816 by marianopeck: Nautilus freezes the VM when  
halting a test
http://code.google.com/p/pharo/issues/detail?id=5816

In fact, if you do "debug test" you don't do a failure, do you?  The only  
difference between "debug test" and put a self halt somewhere is the place  
where the system halts. So it should behave the same way.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5816 in pharo: Nautilus freezes the VM when halting a test

pharo

Comment #9 on issue 5816 by [hidden email]: Nautilus freezes the VM  
when halting a test
http://code.google.com/p/pharo/issues/detail?id=5816

if you run the tests for a whole class, and that one test have a halt, you  
do not want that it stops everything :s

I will try to do both :)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5816 in pharo: Nautilus freezes the VM when halting a test

pharo

Comment #10 on issue 5816 by marianopeck: Nautilus freezes the VM when  
halting a test
http://code.google.com/p/pharo/issues/detail?id=5816

"if you run the tests for a whole class, and that one test have a halt, you  
do not want that it stops everything :s"

are you sure? I think that normally I do want to stop. Sometimes I want to  
debug a part of my project and I don't remember which test covers taht. So  
I just put a halt where I need to see, and then I run all the tests so that  
I halts.

I mean...we don't put halt just becaue. It is exactly when you want to  
debug something.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5816 in pharo: Nautilus freezes the VM when halting a test

pharo

Comment #11 on issue 5816 by marianopeck: Nautilus freezes the VM when  
halting a test
http://code.google.com/p/pharo/issues/detail?id=5816

btw ben, you see why nobody used to run tests in background? it was not  
because it was not possible, just complex ;)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5816 in pharo: Nautilus freezes the VM when halting a test

pharo

Comment #12 on issue 5816 by [hidden email]: Nautilus freezes the VM  
when halting a test
http://code.google.com/p/pharo/issues/detail?id=5816

What I am doing no is that if you run the tests for the class, a test with  
a halt silently fails. And if you run the test alone, I am trying to have  
the halt ;) I have an idea of hack for that ^^


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5816 in pharo: Nautilus freezes the VM when halting a test

pharo

Comment #13 on issue 5816 by marianopeck: Nautilus freezes the VM when  
halting a test
http://code.google.com/p/pharo/issues/detail?id=5816

and what if it halts always, even if runnign the test individually or  
running a class/package?  is that easier?  I would love that. It is as it  
has always been (like in OB).


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5816 in pharo: Nautilus freezes the VM when halting a test

pharo

Comment #14 on issue 5816 by [hidden email]: Nautilus freezes the VM  
when halting a test
http://code.google.com/p/pharo/issues/detail?id=5816

So I finally got it (and find tons of bugs we did in the previous version  
^^)

Can you please have a look at my code ? :)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5816 in pharo: Nautilus freezes the VM when halting a test

pharo

Comment #15 on issue 5816 by marianopeck: Nautilus freezes the VM when  
halting a test
http://code.google.com/p/pharo/issues/detail?id=5816

Hi ben. This is much better!!!! When you run ONE test, and has a halt, it  
just opens the debugger and then if you proceed, you get the notification.  
Perfect.

The only thing I really miss is the posibility to have exactly the same  
behavior when running several tests together (classes or package). Right  
now you put the tests that halts as failure. If I could have at least a  
setting to get the behavior I want, it would awesome.  I tried just  
sending 'true' in #runTestsOfClass: aClass notifying: aBoolean to  
#runTestForAMethod: notifying:    but of course that hangs...

I will see if I can find how to do it.

Thanks Ben for your work!


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5816 in pharo: Nautilus freezes the VM when halting a test

pharo

Comment #16 on issue 5816 by [hidden email]: Nautilus freezes the VM  
when halting a test
http://code.google.com/p/pharo/issues/detail?id=5816

Change

testResult := [ testClass run: testMethod selector ]
                                                        on: Halt
                                                        do: [ :e |
                                                                aBoolean
                                                                        ifTrue: [
                                                                                [ self runTestForAMethodWithAnHalt: aMethod ] fork.
                                                                                shouldAnnounce := false.
                                                                                TestResult new ]
                                                                        ifFalse: [
                                                                                TestResult new
                                                                                        addFailure: (testClass selector: testMethod selector);
                                                                                        yourself ]].

with testResult := [ testClass run: testMethod selector ]
                                                        on: Halt
                                                        do: [ :e |
                                                                [ self runTestForAMethodWithAnHalt: aMethod ] fork.
                                                                shouldAnnounce := false.
                                                                TestResult new ].

Maybe I will add a setting or not, I will see that later in the evening :)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5816 in pharo: Nautilus freezes the VM when halting a test

pharo

Comment #17 on issue 5816 by marianopeck: Nautilus freezes the VM when  
halting a test
http://code.google.com/p/pharo/issues/detail?id=5816

AWESOMEEEEEEEEEE!!!  It works perfect!  I love this behavior. Please please  
please create a setting for that ;)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5816 in pharo: Nautilus freezes the VM when halting a test

pharo
Updates:
        Status: Workneeded

Comment #18 on issue 5816 by [hidden email]: Nautilus freezes the VM  
when halting a test
http://code.google.com/p/pharo/issues/detail?id=5816

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5816 in pharo: Nautilus freezes the VM when halting a test

pharo
Updates:
        Status: Duplicate
        Mergedinto: 5828

Comment #19 on issue 5816 by [hidden email]: Nautilus freezes the VM  
when halting a test
http://code.google.com/p/pharo/issues/detail?id=5816

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker