use of org.apache.activemq.artemis.core.server.reload.ReloadCallback in project activemq-artemis by apache.
the class ReloadManagerTest method internalTest.
private void internalTest(ReloadManagerImpl manager, File file) throws IOException, InterruptedException {
file.createNewFile();
final ReusableLatch latch = new ReusableLatch(1);
manager.addCallback(file.toURL(), new ReloadCallback() {
@Override
public void reload(URL uri) {
latch.countDown();
}
});
Assert.assertFalse(latch.await(1, TimeUnit.SECONDS));
file.setLastModified(System.currentTimeMillis());
Assert.assertTrue(latch.await(1, TimeUnit.SECONDS));
}
Aggregations