This content has been marked as final. 
    
Show                 3 replies
    
- 
        1. Re: You cannot call assertEquals() from different threadsclebert.suconic Nov 4, 2009 8:17 AM (in response to timfox)assertXXXX is just doing this: 
 if (!Condition) throw SomeThrowableException;
 if I catch the Throwable and validate for exceptions on logs, that's the same thing.
 I should be validating for the Throwables on those cases.. now if you see places where this is not happening, then there is an issue. I will double check I'm capturing the failures.
- 
        2. Re: You cannot call assertEquals() from different threadstimfox Nov 4, 2009 8:44 AM (in response to timfox)No, it doesn't work. 
 Like I say, assertions are logged in the logs but the test passes.
- 
        3. Re: You cannot call assertEquals() from different threadsclebert.suconic Nov 4, 2009 9:06 AM (in response to timfox)Those tests were supposed to do something like this: public class Test extends TestCase { class T extends Thread { Throwable t; public void run() { try { assertEquals(1, 2); } catch (Throwable e) { this.t = e; } } } public void testOne() throws Throwable { T thread = new T(); thread.start(); thread.join(); if (thread.t != null) { throw thread.t; } } }
 If the test is not throwing the exception on the main thread, then there is a problem. Where do you see that? I need to fix it.
 
    