Version 1

    So here's my very basic test, all it does is it creates a movie object and puts it into a DB. All that works fine, i can tell by putting a break point after movies.addMovie(movie) and cheking DB. The problem is that when test is finished DB is empty. All tables created during execution are gone. My question is why on earth Arquillian is doing that and how can i turn that behaviour off.




    public class MoviesTest {



        public static JavaArchive createTestArchive() {

            final JavaArchive archive = ShrinkWrap.create(JavaArchive.class)











            return archive;




        private Movies movies;




        public void testAddMovie() throws Exception {

            final Movie movie = new Movie("Steven Spielberg", "Jurassic Park", 1993);








    public class Movies {


        @PersistenceContext(unitName = "myPU", type = PersistenceContextType.EXTENDED)

        private EntityManager em;


        public Movie find(long id) {

            return em.find(Movie.class, id);



        public void addMovie(Movie movie) throws Exception {