Changes to speed up tests.
Change-Id: I1830f564710b9cb06d9c41d31e31854a272fbf4d
diff --git a/core/store/primitives/src/test/java/org/onosproject/store/primitives/resources/impl/AtomixLongTest.java b/core/store/primitives/src/test/java/org/onosproject/store/primitives/resources/impl/AtomixLongTest.java
index c24cc7d..b1a5b7c 100644
--- a/core/store/primitives/src/test/java/org/onosproject/store/primitives/resources/impl/AtomixLongTest.java
+++ b/core/store/primitives/src/test/java/org/onosproject/store/primitives/resources/impl/AtomixLongTest.java
@@ -18,7 +18,8 @@
import io.atomix.Atomix;
import io.atomix.resource.ResourceType;
import io.atomix.variables.DistributedLong;
-import org.junit.Ignore;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
@@ -28,9 +29,18 @@
/**git s
* Unit tests for {@link AtomixCounter}.
*/
-@Ignore
public class AtomixLongTest extends AtomixTestBase {
+ @BeforeClass
+ public static void preTestSetup() throws Throwable {
+ createCopycatServers(3);
+ }
+
+ @AfterClass
+ public static void postTestCleanup() throws Exception {
+ clearTests();
+ }
+
@Override
protected ResourceType resourceType() {
return new ResourceType(DistributedLong.class);
@@ -42,9 +52,9 @@
}
protected void basicOperationsTest(int clusterSize) throws Throwable {
- createCopycatServers(clusterSize);
Atomix atomix = createAtomixClient();
- AtomixCounter along = new AtomixCounter("test-long", atomix.getLong("test-long").join());
+ AtomixCounter along = new AtomixCounter("test-long-basic-operations",
+ atomix.getLong("test-long").join());
assertEquals(0, along.get().join().longValue());
assertEquals(1, along.incrementAndGet().join().longValue());
along.set(100).join();