[utilities COMMIT] /spring-extensions/trunk/src/test/java/net/shibboleth/ext/spring/service/ReloadableSpringServiceTe...
noreply at shibboleth.net
noreply at shibboleth.net
Wed Feb 11 05:55:45 EST 2015
Author: rdw
Date: Wed Feb 11 05:55:45 2015
New Revision: 748
URL: http://svn.shibboleth.net/view/utilities?rev=748&view=rev
Log:
More debugging
Modified:
spring-extensions/trunk/src/test/java/net/shibboleth/ext/spring/service/ReloadableSpringServiceTest.java
Modified: spring-extensions/trunk/src/test/java/net/shibboleth/ext/spring/service/ReloadableSpringServiceTest.java
URL: http://svn.shibboleth.net/view/utilities/spring-extensions/trunk/src/test/java/net/shibboleth/ext/spring/service/ReloadableSpringServiceTest.java?rev=748&r1=747&r2=748&view=diff
==============================================================================
--- spring-extensions/trunk/src/test/java/net/shibboleth/ext/spring/service/ReloadableSpringServiceTest.java (original)
+++ spring-extensions/trunk/src/test/java/net/shibboleth/ext/spring/service/ReloadableSpringServiceTest.java Wed Feb 11 05:55:45 2015
@@ -27,6 +27,8 @@
import net.shibboleth.utilities.java.support.service.ServiceableComponent;
import org.joda.time.DateTime;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.BeanInitializationException;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.BeanPostProcessor;
@@ -45,6 +47,8 @@
private static final long RELOAD_DELAY = 100;
+ private Logger log = LoggerFactory.getLogger(ReloadableSpringServiceTest.class);
+
private File testFile;
private void createPopulatedFile(String dataPath) throws IOException {
@@ -54,7 +58,15 @@
}
private Resource testFileResource() {
- return new FileSystemResource(testFile);
+ return new FileSystemResource(testFile) {
+ /** {@inheritDoc} */
+ @Override
+ protected File getFileForLastModifiedCheck() throws IOException {
+ File f = super.getFileForLastModifiedCheck();
+ log.debug("GetFileForLastModifiedCheck file {}, ourfile {}, modified {}, outmodified {}", f, testFile, f.lastModified(), testFile.lastModified());
+ return f;
+ }
+ };
}
private void overwriteFileWith(String newDataPath) throws IOException {
@@ -111,6 +123,7 @@
new ReloadableSpringService<>(TestServiceableComponent.class);
createPopulatedFile("net/shibboleth/ext/spring/service/ServiceableBean1.xml");
+ Thread.sleep(RELOAD_DELAY); // sleep to let the file arrive.
service.setFailFast(true);
service.setId("deferedReload");
More information about the commits
mailing list