[jboss-cvs] JBossAS SVN: r105737 - branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/profileservice/override/restart/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jun 4 18:17:49 EDT 2010


Author: bstansberry at jboss.com
Date: 2010-06-04 18:17:49 -0400 (Fri, 04 Jun 2010)
New Revision: 105737

Modified:
   branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/ServiceBindingManagedObjectsTestCase.java
Log:
[JBPAPP-4432] Fix unnecessary binding count check

Modified: branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/ServiceBindingManagedObjectsTestCase.java
===================================================================
--- branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/ServiceBindingManagedObjectsTestCase.java	2010-06-04 20:59:08 UTC (rev 105736)
+++ branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/ServiceBindingManagedObjectsTestCase.java	2010-06-04 22:17:49 UTC (rev 105737)
@@ -353,11 +353,12 @@
          offsets.put(name, getSimpleValue(mv, "portOffset", Integer.class));
          hosts.put(name, getSimpleValue(mv, "defaultHostName", String.class));
       }
-      IndexedArray indexedArray = checkAddedBinding(properties, 25, 23456, offsets, hosts);
       
+      checkAddedBinding(properties, 23456, offsets, hosts);
+      
    }
    
-   private IndexedArray checkAddedBinding(Map<String, ManagedProperty> properties, int bindingCount, int basePort, Map<String, Integer> offsets, Map<String, String> hosts)
+   private IndexedArray checkAddedBinding(Map<String, ManagedProperty> properties, int basePort, Map<String, Integer> offsets, Map<String, String> hosts)
    {
       // Return the array of standard bindings + the pos of the added binding
       IndexedArray result = new IndexedArray();
@@ -370,7 +371,11 @@
       assertNotNull("property standardBindings has no value", val);
       assertTrue("property standardBindings value is CollectionValue", val instanceof CollectionValue);
       MetaValue[] refreshedElements = ((CollectionValue) val).getElements();
-      assertEquals(bindingCount, refreshedElements.length);
+      // FIXME Using a fixed count of expected # of bindings is stupid; it changes whenever
+      // new stuff is added or old stuff removed. Here we just confirm there are a
+      // reasonable # of bindings (as of 12/2009 there are > 25) which is also stupid
+      // but a bit less so
+      assertTrue(refreshedElements.length > 10);
       result.array = refreshedElements; // pass back to caller
       boolean sawAdded = false;
       for (int i = 0; i < refreshedElements.length; i++)



More information about the jboss-cvs-commits mailing list