users@glassfish.java.net

Re: JUnit tests with Glassfish EJB's

From: <glassfish_at_javadesktop.org>
Date: Tue, 23 Mar 2010 20:31:19 PDT

Your query should fail in the 2nd call because there will be 2 rows with somedata of "xxx". You do not remove created entity in the @After method, but you marked the id field with @GeneratedValue, so the 2nd add will create one more entity and the query will return both of them because both of them have "xxx" in the somedata column.

-marina
[Message sent by forum member 'mvatkina']

http://forums.java.net/jive/thread.jspa?messageID=393397