Author: manik.surtani(a)jboss.com
Date: 2009-03-16 16:38:11 -0400 (Mon, 16 Mar 2009)
New Revision: 7906
Modified:
core/trunk/src/main/java/org/jboss/cache/DataContainerImpl.java
core/trunk/src/test/java/org/jboss/cache/DataContainerTest.java
Log:
Fixed data container test failure
Modified: core/trunk/src/main/java/org/jboss/cache/DataContainerImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/DataContainerImpl.java 2009-03-16 20:37:52
UTC (rev 7905)
+++ core/trunk/src/main/java/org/jboss/cache/DataContainerImpl.java 2009-03-16 20:38:11
UTC (rev 7906)
@@ -72,7 +72,7 @@
private BuddyFqnTransformer buddyFqnTransformer;
private Configuration config;
private boolean usingMvcc;
- private volatile boolean started = false;
+ volatile boolean started = false;
private static final InternalNode[] NULL_ARRAY = {null, null};
@Inject
Modified: core/trunk/src/test/java/org/jboss/cache/DataContainerTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/DataContainerTest.java 2009-03-16 20:37:52
UTC (rev 7905)
+++ core/trunk/src/test/java/org/jboss/cache/DataContainerTest.java 2009-03-16 20:38:11
UTC (rev 7906)
@@ -3,12 +3,12 @@
import org.jboss.cache.buddyreplication.BuddyFqnTransformer;
import org.jboss.cache.marshall.NodeData;
import org.jboss.cache.mock.MockNodesFixture;
+import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import java.util.ArrayList;
import java.util.List;
-import org.testng.annotations.AfterMethod;
/**
* Tests functionality from DataContainer.
@@ -180,7 +180,10 @@
*/
public void testGetNumberOfNodes()
{
- assert container.getNumberOfNodes() == 8 : "eoght nodes expected";
+ int i;
+ assert (i=container.getNumberOfNodes()) == -1 : "-1 nodes expected, was "
+ i;
+ container.started = true;
+ assert (i=container.getNumberOfNodes()) == 8 : "8 nodes expected, was " +
i;
}
/**
Show replies by date