[java-identity-provider COMMIT] in /trunk/idp-core/src: main/java/net/shibboleth/idp/service/AbstractReloadableServic...
noreply at shibboleth.net
noreply at shibboleth.net
Fri Dec 6 07:00:55 EST 2013
Author: rdw
Date: Fri Dec 6 07:00:55 2013
New Revision: 5001
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5001&view=rev
Log:
IdP-330 More testing for jenkins test failure
Modified:
trunk/idp-core/src/main/java/net/shibboleth/idp/service/AbstractReloadableService.java
trunk/idp-core/src/main/java/net/shibboleth/idp/service/ReloadableSpringService.java
trunk/idp-core/src/test/java/net/shibboleth/idp/service/ReloadableSpringServiceTest.java
Modified: trunk/idp-core/src/main/java/net/shibboleth/idp/service/AbstractReloadableService.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-core/src/main/java/net/shibboleth/idp/service/AbstractReloadableService.java?rev=5001&r1=5000&r2=5001&view=diff
==============================================================================
--- trunk/idp-core/src/main/java/net/shibboleth/idp/service/AbstractReloadableService.java (original)
+++ trunk/idp-core/src/main/java/net/shibboleth/idp/service/AbstractReloadableService.java Fri Dec 6 07:00:55 2013
@@ -124,7 +124,7 @@
*
* @param timer timer used to schedule configuration reload tasks
*/
- public synchronized void setReloadTaskTimer(@Nullable final Timer timer) {
+ public void setReloadTaskTimer(@Nullable final Timer timer) {
ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
reloadTaskTimer = timer;
Modified: trunk/idp-core/src/main/java/net/shibboleth/idp/service/ReloadableSpringService.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-core/src/main/java/net/shibboleth/idp/service/ReloadableSpringService.java?rev=5001&r1=5000&r2=5001&view=diff
==============================================================================
--- trunk/idp-core/src/main/java/net/shibboleth/idp/service/ReloadableSpringService.java (original)
+++ trunk/idp-core/src/main/java/net/shibboleth/idp/service/ReloadableSpringService.java Fri Dec 6 07:00:55 2013
@@ -96,7 +96,7 @@
*
* @param context context that is the parent to this service's context, may be null
*/
- public synchronized void setParentContext(@Nullable final ApplicationContext context) {
+ public void setParentContext(@Nullable final ApplicationContext context) {
ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
parentContext = context;
@@ -276,6 +276,7 @@
oldComponent.unloadComponent();
}
lastLoadFailed = false;
+ log.debug("Reload complete");
}
/** {@inheritDoc} */
Modified: trunk/idp-core/src/test/java/net/shibboleth/idp/service/ReloadableSpringServiceTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-core/src/test/java/net/shibboleth/idp/service/ReloadableSpringServiceTest.java?rev=5001&r1=5000&r2=5001&view=diff
==============================================================================
--- trunk/idp-core/src/test/java/net/shibboleth/idp/service/ReloadableSpringServiceTest.java (original)
+++ trunk/idp-core/src/test/java/net/shibboleth/idp/service/ReloadableSpringServiceTest.java Fri Dec 6 07:00:55 2013
@@ -46,6 +46,7 @@
private void createPopulatedFile(String dataPath) throws IOException {
testFile = File.createTempFile("ReloadableSpringServiceTest", "xml");
overwriteFileWith(dataPath);
+ testFile.setLastModified(1);
}
private Resource testFileResource() {
@@ -58,7 +59,7 @@
stream.close();
}
- @Test public void reloadableService() throws IOException, InterruptedException {
+ @Test(enabled=true) public void reloadableService() throws IOException, InterruptedException {
final ReloadableSpringService<TestServiceableComponent> service =
new ReloadableSpringService<>(TestServiceableComponent.class);
@@ -99,7 +100,7 @@
service.stop();
}
- @Test public void deferedReload() throws IOException, InterruptedException {
+ @Test(enabled=true) public void deferedReload() throws IOException, InterruptedException {
final ReloadableSpringService<TestServiceableComponent> service =
new ReloadableSpringService<>(TestServiceableComponent.class);
@@ -166,6 +167,7 @@
try {
service.start();
+ Assert.fail("Expected to fail");
} catch (BeanInitializationException e) {
// OK
}
@@ -190,17 +192,19 @@
service.setReloadCheckDelay(RELOAD_DELAY);
service.setServiceConfigurations(Collections.singletonList(testFileResource()));
- try {
- service.start();
- } catch (BeanInitializationException e) {
- // OK
- }
+ service.start();
Assert.assertNull(service.getServiceableComponent());
overwriteFileWith("net/shibboleth/idp/service/ServiceableBean2.xml");
- Thread.sleep(RELOAD_DELAY * 2);
[... 31 lines stripped ...]
More information about the commits
mailing list