diff --git a/dspace-api/src/test/java/org/dspace/AbstractIntegrationTest.java b/dspace-api/src/test/java/org/dspace/AbstractIntegrationTest.java index f5817e51dc..d437a77385 100644 --- a/dspace-api/src/test/java/org/dspace/AbstractIntegrationTest.java +++ b/dspace-api/src/test/java/org/dspace/AbstractIntegrationTest.java @@ -33,6 +33,12 @@ import org.junit.Ignore; @Ignore public class AbstractIntegrationTest extends AbstractUnitTest { + /** + * this is the amount of time that guarantee us that changes to the configuration files are picked up. + * The actual refresh rate is defined in dspace/config/config-definition.xml + */ + private static final int CONFIG_RELOAD_TIME = 5500; + /** * holds the size of the local.cfg file, see {@link #cleanExtraConfigurations()} **/ @@ -87,8 +93,8 @@ public class AbstractIntegrationTest extends AbstractUnitTest { FileChannel.open(Paths.get(extraConfPath), StandardOpenOption.WRITE) .truncate(initialLocalCfgSize).close(); localCfgChanged = false; - // sleep for 5.5 seconds to give the time to the configuration to note the change - Thread.sleep(5500); + // sleep to give the time to the configuration to note the change + Thread.sleep(CONFIG_RELOAD_TIME); } catch (IOException | InterruptedException e) { throw new RuntimeException(e.getMessage(), e); } @@ -118,8 +124,8 @@ public class AbstractIntegrationTest extends AbstractUnitTest { output.flush(); output.close(); localCfgChanged = true; - // sleep for 5.5 seconds to give the time to the configuration to note the change - Thread.sleep(5500); + // sleep to give the time to the configuration to note the change + Thread.sleep(CONFIG_RELOAD_TIME); } catch (IOException | InterruptedException e) { throw new RuntimeException(e.getMessage(), e); }