From f7b229647759d69c0d295353311719869cd3e725 Mon Sep 17 00:00:00 2001 From: Mirza Karacic Date: Mon, 30 Dec 2024 13:42:12 -0800 Subject: [PATCH] Added fix for failing test when using AS non enterprise --- test/src/com/aerospike/test/SuiteSync.java | 3 ++- test/src/com/aerospike/test/sync/TestSync.java | 2 ++ test/src/com/aerospike/test/sync/basic/TestPutGet.java | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/test/src/com/aerospike/test/SuiteSync.java b/test/src/com/aerospike/test/SuiteSync.java index c65aa0def..9f0c66965 100644 --- a/test/src/com/aerospike/test/SuiteSync.java +++ b/test/src/com/aerospike/test/SuiteSync.java @@ -113,13 +113,14 @@ }) public class SuiteSync { public static IAerospikeClient client = null; + public static Args args = null; @BeforeClass public static void init() { Log.setCallback(null); System.out.println("Begin AerospikeClient"); - Args args = Args.Instance; + args = Args.Instance; ClientPolicy policy = new ClientPolicy(); args.setClientPolicy(policy); diff --git a/test/src/com/aerospike/test/sync/TestSync.java b/test/src/com/aerospike/test/sync/TestSync.java index 1f6d1cf7c..beef07047 100644 --- a/test/src/com/aerospike/test/sync/TestSync.java +++ b/test/src/com/aerospike/test/sync/TestSync.java @@ -18,6 +18,7 @@ import static org.junit.Assert.fail; +import com.aerospike.test.util.Args; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -30,6 +31,7 @@ public class TestSync extends TestBase { protected static IAerospikeClient client = SuiteSync.client; + protected static Args args = SuiteSync.args; private static boolean DestroyClient = false; @BeforeClass diff --git a/test/src/com/aerospike/test/sync/basic/TestPutGet.java b/test/src/com/aerospike/test/sync/basic/TestPutGet.java index 7d557c0c9..e0641c389 100644 --- a/test/src/com/aerospike/test/sync/basic/TestPutGet.java +++ b/test/src/com/aerospike/test/sync/basic/TestPutGet.java @@ -16,11 +16,15 @@ */ package com.aerospike.test.sync.basic; +import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import com.aerospike.test.SuiteSync; +import com.aerospike.test.util.Args; +import org.junit.Assume; import org.junit.Test; import com.aerospike.client.Bin; @@ -85,6 +89,7 @@ public void putGetBool() { @Test public void putGetCompress() { + Assume.assumeThat(args.enterprise, is(true)); Key key = new Key(args.namespace, args.set, "pgc"); byte[] bytes = new byte[2000];