diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 19e7d8a9..2afdd0dd 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -75,10 +75,6 @@ jobs: cd AerospikeClient dotnet restore dotnet build -p:UseSharedCompilation=false --configuration Release - - cd ../AerospikeClientProxy - dotnet restore - dotnet build -p:UseSharedCompilation=false --configuration Release - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 diff --git a/AerospikeTest/Async/TestAsyncTxn.cs b/AerospikeTest/Async/TestAsyncTxn.cs index af397f37..6d4fb21d 100644 --- a/AerospikeTest/Async/TestAsyncTxn.cs +++ b/AerospikeTest/Async/TestAsyncTxn.cs @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 Aerospike, Inc. + * Copyright 2012-2025 Aerospike, Inc. * * Portions may be licensed to Aerospike, Inc. under one or more contributor * license agreements. @@ -23,7 +23,7 @@ namespace Aerospike.Test { - [TestClass] + [TestClass, TestCategory("SCMode")] public class TestAsyncTxn : TestAsync { private static readonly string binName = "bin"; diff --git a/AerospikeTest/Sync/Basic/TestPutGet.cs b/AerospikeTest/Sync/Basic/TestPutGet.cs index a1d1e283..391869fd 100644 --- a/AerospikeTest/Sync/Basic/TestPutGet.cs +++ b/AerospikeTest/Sync/Basic/TestPutGet.cs @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 Aerospike, Inc. + * Copyright 2012-2025 Aerospike, Inc. * * Portions may be licensed to Aerospike, Inc. under one or more contributor * license agreements. @@ -104,56 +104,44 @@ public void PutGetGeoJson() Assert.AreEqual(r.GetValue("geo").GetType(), geoBin.value.GetType()); } - [TestMethod] + [TestMethod, TestCategory("Enterprise")] public void PutGetCompression() { - Node node = client.Nodes[0]; - IDictionary map = Info.Request(null, node); - Assert.IsNotNull(map); + WritePolicy writePolicy = new() + { + compress = true + }; + + Policy policy = new() + { + compress = true + }; + + Key key = new(args.ns, args.set, "putgetc"); + Record record; + + List list = new(); + int[] iterator = Enumerable.Range(0, 2000).ToArray(); + foreach (int i in iterator) + { + list.Add(i.ToString()); + } + + Bin bin1 = new("bin", list); + + client.Put(writePolicy, key, bin1); + record = client.Get(policy, key); + var bin1List = bin1.value.Object; + record.bins.TryGetValue("bin", out object recordBin); + CollectionAssert.AreEquivalent((List)bin1List, (List)recordBin); + + record = client.GetHeader(policy, key); + AssertRecordFound(key, record); - foreach (KeyValuePair entry in map) + // Generation should be greater than zero. Make sure it's populated. + if (record.generation == 0) { - string kvp = entry.Key; - - if (kvp.Equals("build_ee_sha")) // Compression only available in EE - { - Client.WritePolicy writePolicy = new() - { - compress = true - }; - - Policy policy = new() - { - compress = true - }; - - Key key = new(args.ns, args.set, "putgetc"); - Record record; - - List list = new(); - int[] iterator = Enumerable.Range(0, 2000).ToArray(); - foreach (int i in iterator) - { - list.Add(i.ToString()); - } - - Bin bin1 = new("bin", list); - - client.Put(writePolicy, key, bin1); - record = client.Get(policy, key); - var bin1List = bin1.value.Object; - record.bins.TryGetValue("bin", out object recordBin); - CollectionAssert.AreEquivalent((List)bin1List, (List)recordBin); - - record = client.GetHeader(policy, key); - AssertRecordFound(key, record); - - // Generation should be greater than zero. Make sure it's populated. - if (record.generation == 0) - { - Assert.Fail("Invalid record header: generation=" + record.generation + " expiration=" + record.expiration); - } - } + Assert.Fail("Invalid record header: generation=" + record.generation + " expiration=" + record.expiration); } } } diff --git a/AerospikeTest/Sync/Basic/TestTxn.cs b/AerospikeTest/Sync/Basic/TestTxn.cs index b5024183..e02d3cb0 100644 --- a/AerospikeTest/Sync/Basic/TestTxn.cs +++ b/AerospikeTest/Sync/Basic/TestTxn.cs @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 Aerospike, Inc. + * Copyright 2012-2025 Aerospike, Inc. * * Portions may be licensed to Aerospike, Inc. under one or more contributor * license agreements. @@ -21,7 +21,7 @@ namespace Aerospike.Test { - [TestClass] + [TestClass, TestCategory("SCMode")] public class TestTxn : TestSync { private static readonly string binName = "bin";