[java-shib-attribute] 02/02: JSATTR-51 Reinstate Debug code

Codeberg noreply at shibboleth.net
Fri Aug 7 15:36:04 UTC 2026


This is an automated email from the git hooks/post-receive script.

codeberg pushed a commit to branch main
in repository java-shib-attribute.

View the commit online:
https://codeberg.org/Shibboleth/java-shib-attribute/commit/e14628e613ca69c00edd3a5cf63690529c727751

commit e14628e613ca69c00edd3a5cf63690529c727751
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Fri Aug 7 16:34:08 2026 +0100

    JSATTR-51 Reinstate Debug code
    
    https://shibboleth.atlassian.net/browse/JSATTR-51
    
    This reverts commit 7d6b7320d31cc36c7818aeaa7dcf01bd9e9df079.
---
 .../resolver/spring/AttributeResolverTest.java     | 28 +++++++++++++---------
 1 file changed, 17 insertions(+), 11 deletions(-)

diff --git a/shib-attribute-resolver-spring/src/test/java/net/shibboleth/idp/attribute/resolver/spring/AttributeResolverTest.java b/shib-attribute-resolver-spring/src/test/java/net/shibboleth/idp/attribute/resolver/spring/AttributeResolverTest.java
index 234202345..700c6beb1 100644
--- a/shib-attribute-resolver-spring/src/test/java/net/shibboleth/idp/attribute/resolver/spring/AttributeResolverTest.java
+++ b/shib-attribute-resolver-spring/src/test/java/net/shibboleth/idp/attribute/resolver/spring/AttributeResolverTest.java
@@ -116,6 +116,7 @@ public class AttributeResolverTest extends OpenSAMLInitBaseTestCase {
                 new ClassPathResource(LDAP_INIT_FILE),
                 10391);
         directoryServer.start();
+        assertEquals(directoryServer.openConnectionCount(), 0);
 
         // RDBMS
         datasource = DatabaseTestingSupport.GetMockDataSource(DB_INIT_FILE, "myTestDB");
@@ -128,9 +129,10 @@ public class AttributeResolverTest extends OpenSAMLInitBaseTestCase {
      * @throws InterruptedException 
      */
     @AfterClass public void teardownDataConnectors() throws InterruptedException {
+        tearDownTestContext();
         if (directoryServer != null) {
             if (directoryServer.openConnectionCount() > 0) {
-                Thread.sleep(100);
+                Thread.sleep(200);
             }
             assert directoryServer != null;
             assertEquals(directoryServer.openConnectionCount(), 0);
@@ -162,11 +164,11 @@ public class AttributeResolverTest extends OpenSAMLInitBaseTestCase {
         return result;
     }
     
-    @Test public void service() throws ComponentInitializationException, ServiceException, ResolutionException {
+    @Test(enabled = false) public void service() throws ComponentInitializationException, ServiceException, ResolutionException {
         helper(false);
     }
     
-    @Test public void serviceNullStrip() throws ComponentInitializationException, ServiceException, ResolutionException {
+    @Test(enabled = false) public void serviceNullStrip() throws ComponentInitializationException, ServiceException, ResolutionException {
         helper(true);
     }
 
@@ -343,7 +345,7 @@ public class AttributeResolverTest extends OpenSAMLInitBaseTestCase {
     }
 
     @SuppressWarnings("unchecked")
-    @Test public void idp2052() throws IOException, ResolutionException
+    @Test(enabled = false) public void idp2052() throws IOException, ResolutionException
     {
         Path p = Files.createTempFile("Attr", "2052");
 
@@ -391,7 +393,7 @@ public class AttributeResolverTest extends OpenSAMLInitBaseTestCase {
         Files.delete(p);
     }
 
-    @Test public void mappedTemplate() throws Exception {
+    @Test(enabled = false) public void mappedTemplate() throws Exception {
         final ReloadableService<AttributeResolver> attributeResolverService = getResolver("net/shibboleth/idp/attribute/resolver/spring/mappedTemplateService.xml");
 
         attributeResolverService.initialize();
@@ -410,7 +412,7 @@ public class AttributeResolverTest extends OpenSAMLInitBaseTestCase {
         assertEquals(resolvedAttributes.get("testing").getValues().size(), 2);
     }
 
-    @Test public void selective() throws ResolutionException, ComponentInitializationException {
+    @Test(enabled = false) public void selective() throws ResolutionException, ComponentInitializationException {
         final GenericApplicationContext context = new GenericApplicationContext();
         setTestContext(context);
         context.setDisplayName("ApplicationContext: " + AttributeResolverTest.class);
@@ -442,11 +444,12 @@ public class AttributeResolverTest extends OpenSAMLInitBaseTestCase {
         assertTrue(resolutionContext.getResolvedIdPAttributes().isEmpty());
     }
     
-    @Test public void preResolve() throws ResolutionException, ComponentInitializationException {
+    @Test(enabled = true) public void preResolve() throws ResolutionException, ComponentInitializationException {
         final GenericApplicationContext context = new GenericApplicationContext();
         setTestContext(context);
         context.setDisplayName("ApplicationContext: " + AttributeResolverTest.class);
-
+        assertEquals(directoryServer.openConnectionCount(), 0);
+        
         final SchemaTypeAwareXMLBeanDefinitionReader beanDefinitionReader =
                 new SchemaTypeAwareXMLBeanDefinitionReader(context);
 
@@ -460,6 +463,7 @@ public class AttributeResolverTest extends OpenSAMLInitBaseTestCase {
 
         resolver.resolveAttributes(resolutionContext);
         assertEquals(resolutionContext.getResolvedIdPAttributes().size(), 2);
+        assertEquals(directoryServer.openConnectionCount(), 0);
         final IdPAttribute pre =  resolutionContext.getResolvedIdPAttributes().get("pre");
         /* 
          * pre:
@@ -471,6 +475,7 @@ public class AttributeResolverTest extends OpenSAMLInitBaseTestCase {
          * it is preresolved so...
          */
         assertEquals(pre.getValues().size(), 1);
+        assertEquals(directoryServer.openConnectionCount(), 0);
         assertEquals(pre.getValues().get(0).getDisplayValue(), "preValueOnly");
         final IdPAttribute postOnly =  resolutionContext.getResolvedIdPAttributes().get("postOnly");
         /*
@@ -480,9 +485,10 @@ public class AttributeResolverTest extends OpenSAMLInitBaseTestCase {
          */
         assertEquals(postOnly.getValues().size(), 1);
         assertEquals(postOnly.getValues().get(0).getDisplayValue(), "preOnly");
-    }
+        assertEquals(directoryServer.openConnectionCount(), 0);
+}
 
-    @Test public void selectiveNavigate() throws ResolutionException, ComponentInitializationException {
+    @Test(enabled = false) public void selectiveNavigate() throws ResolutionException, ComponentInitializationException {
         final GenericApplicationContext context = new GenericApplicationContext();
         setTestContext(context);
         context.setDisplayName("ApplicationContext: " + AttributeResolverTest.class);
@@ -524,7 +530,7 @@ public class AttributeResolverTest extends OpenSAMLInitBaseTestCase {
         assertTrue(resolutionContext.getResolvedIdPAttributes().isEmpty());
     }
     
-    @Test public void multiFile() throws ResolutionException {
+    @Test(enabled = false) public void multiFile() throws ResolutionException {
         final ReloadableService<AttributeResolver> attributeResolverService = getResolver("net/shibboleth/idp/attribute/resolver/spring/multiFileService.xml");
         
         final AttributeResolutionContext resolutionContext =

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list