Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-11627

InfinispanServerRule returning FileAlreadyExistsException if you use mavenArtifacts and restart the server

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      If we use InfinispanServerRule deploying maven artifacts and restart the server during the tests, we will receive FileAlreadyExistsException

      @ClassRule
         public static InfinispanServerRule SERVERS =
               InfinispanServerRuleBuilder.config("configuration/PersistenceTest.xml")
                                          .numServers(1)
                                          .runMode(ServerRunMode.CONTAINER)
                                          .mavenArtifacts("com.h2database:h2:1.4.199")
                                          .build();
      ...
      
      ContainerInfinispanServerDriver serverDriver = (ContainerInfinispanServerDriver) SERVER.getServerDriver();
              RestClient rest = SERVER_TEST.rest().get();
              sync(rest.server().stop());
              Eventually.eventually(
                      "Cluster did not shutdown within timeout",
                      () -> (!serverDriver.isRunning(0) ),
                      serverDriver.getTimeout(), 1, TimeUnit.SECONDS);
      
              serverDriver.restart(0);
      

              gustavolira Gustavo Lira Silva
              gustavolira Gustavo Lira Silva
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: