I've managed to reproduce the issue with your code (many thanks for that!). I'm not sure why its happening, your code looks ok to me, so I'm going to dig deeper to try and figure out what's going on.

Cheers

Jon


coloradoflyer wrote:
Hi Jon/all,

I attached a jar with the test case.  Basically, there are 5 source files in
here and a sql script to create the entities.
The interface for the stateless session bean, the concrete class for it.
The 2 Entites, and the Test case.  Its pretty small.

If you take a look at the test case, if it passes, that in itself displays
the problem. The test case is TestAudioServices, and the line that
**should** fail is line 40, it looks for null for the name of the status
(which should never be null).  The proof that this case displays the
problem, is on line 43, basically line 42 reloads the entity by its id, and
then checks to see if the status now is not null, one of those 2 lines (41
or 43) should fail.

These are the lines in question:
         file = stateless.update(file);
assertNull(file.getAudioFileStatus().getName()); file = stateless.findById(file.getId());
         assertNotNull(file.getAudioFileStatus().getName());

Thanks for looking into this, I keep thinking I'm going to find something
wrong in my code, but I'm not seeing it so far, and its relatively trivial
now.
http://www.nabble.com/file/p22509703/testerror.jar testerror.jar -chris

Reply via email to