From 50458830c7937fb9696adfc2fa58518cc18f426f Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Tue, 25 Jun 2024 04:10:59 +0200 Subject: [PATCH 01/52] Added MacOS and Windows test using a local version of Apache Kafka server --- .github/workflows/build.yaml | 86 +++++++++++++++++++++++++++++------- 1 file changed, 70 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b609f51ac0..6261707f0a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -189,6 +189,11 @@ jobs: env: GITHUB_TEST_PREPARATION: true + - name: Prepare configuration files + run: | + Copy-Item src\container\config_container\zookeeper.properties -Destination bin\zookeeper.properties -Force + Copy-Item src\container\config_container\server.properties -Destination bin\server.properties -Force + - name: Save KNet bin in cache uses: actions/cache/save@v4 with: @@ -262,7 +267,7 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - execute_KNetTest: + execute_KNetTest_linux: needs: [build_windows, build_container_knettest] services: kafka: @@ -274,29 +279,19 @@ jobs: ports: - 9092:9092 env: - KNET_RUNNING_MODE: server + KNET_DOCKER_RUNNING_MODE: server JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} strategy: fail-fast: false matrix: os: [ 'ubuntu-latest' ] #, 'macos-latest', 'macos-13' , 'windows-latest' ] - framework: [ 'net462', 'net6.0', 'net8.0' ] + framework: [ 'net6.0', 'net8.0' ] buffered: [ 'runBuffered', ''] - extraValue: [ '', 'withBigExtraValue', 'withBigBigExtraValue' ] + extraValue: [ '', 'withBigBigExtraValue' ] jdk_vendor: [ 'temurin', 'zulu', 'microsoft', 'corretto', 'oracle'] jdk_version: [ '11', '17', '21' ] # only LTS versions exclude: - - os: ubuntu-latest - framework: net462 - - os: macos-latest - framework: net462 - - os: macos-latest - framework: net6.0 - - os: macos-13 - framework: net462 - - os: macos-13 - framework: net6.0 - jdk_vendor: oracle jdk_version: 11 @@ -316,7 +311,7 @@ jobs: distribution: ${{ matrix.jdk_vendor }} java-version: ${{ matrix.jdk_version }} - - name: Executing KNetTest on Ubuntu with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} + - name: Executing KNetTest on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' || matrix.os == 'macos-13' }} continue-on-error: true run: dotnet ./bin/${{ matrix.framework }}/KNetTest.dll localhost:9092 randomizeTopicName ${{ matrix.buffered }} ${{ matrix.extraValue }} @@ -335,4 +330,63 @@ jobs: # if: ${{ matrix.os == 'windows-latest' && matrix.framework == 'net462' }} # run: .\bin\${{ matrix.framework }}\KNetTest.exe localhost:9092 randomizeTopicName ${{ matrix.buffered }} ${{ matrix.extraValue }} # env: - # JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} \ No newline at end of file + # JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} + + execute_KNetTest_other: + needs: [build_windows, build_container_knettest] + strategy: + fail-fast: false + matrix: + os: [ 'macos-latest', 'macos-13' , 'windows-latest' ] + framework: [ 'net462', 'net6.0', 'net8.0' ] + buffered: [ 'runBuffered', ''] + extraValue: [ '', 'withBigBigExtraValue' ] + jdk_vendor: [ 'temurin', 'zulu', 'microsoft', 'corretto', 'oracle'] + jdk_version: [ '11', '17', '21' ] # only LTS versions + exclude: + - os: macos-latest + framework: net462 + - os: macos-latest + framework: net6.0 + - os: macos-13 + framework: net462 + - os: macos-13 + framework: net6.0 + - jdk_vendor: oracle + jdk_version: 11 + + runs-on: ${{ matrix.os }} + steps: + - name: Restore KNet bin from cache + uses: actions/cache/restore@v4 + with: + fail-on-cache-miss: true + enableCrossOsArchive: true + path: ./bin/ + key: KNet_bin_${{ github.sha }} + + - name: Set up JDK distribution + uses: actions/setup-java@v4 + with: # running setup-java again overwrites the settings.xml + distribution: ${{ matrix.jdk_vendor }} + java-version: ${{ matrix.jdk_version }} + + - name: Authenticate to GitHub + run: dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/masesgroup/index.json" + + - name: Download latest published version of KNetCLI + run: dotnet tool update -g MASES.KNetCLI + + - name: Start Kafka on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} + shell: pwsh + run: | + Start-Process -FilePath knet -ArgumentList ( 'zookeeperstart', '${{ github.workspace }}/bin/zookeeper.properties' ) + Start-Process -FilePath knet -ArgumentList ( 'kafkastart', '${{ github.workspace }}/bin/server.properties' ) + env: + JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} + + - name: Executing KNetTest on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} + shell: pwsh + run: dotnet ${{ github.workspace }}/bin/${{ matrix.framework }}/KNetTest.dll localhost:9092 randomizeTopicName ${{ matrix.buffered }} ${{ matrix.extraValue }} + env: + JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} From 6a6b7852b2e9226370c0cefc250a356652f4cde7 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Tue, 25 Jun 2024 04:41:47 +0200 Subject: [PATCH 02/52] up --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6261707f0a..a973bbba00 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -333,7 +333,7 @@ jobs: # JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} execute_KNetTest_other: - needs: [build_windows, build_container_knettest] + needs: [build_windows] strategy: fail-fast: false matrix: From bd5dc20b2fec54dcc4af4543a721efffee5d11fb Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Tue, 25 Jun 2024 04:59:13 +0200 Subject: [PATCH 03/52] Add SerDes test --- .github/workflows/build.yaml | 20 +++++ tests/net/KNetTest/Program.cs | 4 +- tests/net/KNetTestSerDes/Program.cs | 123 ++++++++++++++-------------- 3 files changed, 84 insertions(+), 63 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a973bbba00..4155fe5bc8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -311,6 +311,12 @@ jobs: distribution: ${{ matrix.jdk_vendor }} java-version: ${{ matrix.jdk_version }} + - name: Executing KNetTestSerDes on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} + shell: pwsh + run: dotnet ${{ github.workspace }}/bin/${{ matrix.framework }}/KNetTestSerDes.dll + env: + JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} + - name: Executing KNetTest on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' || matrix.os == 'macos-13' }} continue-on-error: true @@ -371,6 +377,12 @@ jobs: distribution: ${{ matrix.jdk_vendor }} java-version: ${{ matrix.jdk_version }} + - name: Executing KNetTestSerDes on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} + shell: pwsh + run: dotnet ${{ github.workspace }}/bin/${{ matrix.framework }}/KNetTestSerDes.dll + env: + JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} + - name: Authenticate to GitHub run: dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/masesgroup/index.json" @@ -386,7 +398,15 @@ jobs: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - name: Executing KNetTest on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} + if: ${{ matrix.os != 'windows-latest' }} shell: pwsh run: dotnet ${{ github.workspace }}/bin/${{ matrix.framework }}/KNetTest.dll localhost:9092 randomizeTopicName ${{ matrix.buffered }} ${{ matrix.extraValue }} env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} + + - name: Executing KNetTest on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} + if: ${{ matrix.os == 'windows-latest' }} + shell: pwsh + run: ${{ github.workspace }}/bin/${{ matrix.framework }}/KNetTest.exe localhost:9092 randomizeTopicName ${{ matrix.buffered }} ${{ matrix.extraValue }} + env: + JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} diff --git a/tests/net/KNetTest/Program.cs b/tests/net/KNetTest/Program.cs index 8f2eb9a3d5..c4bfbf445e 100644 --- a/tests/net/KNetTest/Program.cs +++ b/tests/net/KNetTest/Program.cs @@ -460,7 +460,7 @@ static void ConsumeSomething() cycle++; if (elements >= 0 && cycle == 60 * 5) { - throw new InvalidOperationException($"Forcibly exit since no {NonParallelLimit} record was received within 1 minute."); + throw new InvalidOperationException($"Forcibly exit since no {NonParallelLimit} record was received within 1 minute. Current is {elements}"); } } watcherTotal.Stop(); @@ -670,7 +670,7 @@ static void ConsumeSomethingBuffered() cycle++; if (elements >= 0 && cycle == 60 * 5) { - throw new InvalidOperationException($"Forcibly exit since no {NonParallelLimit} record was received within 1 minute."); + throw new InvalidOperationException($"Forcibly exit since no {NonParallelLimit} record was received within 1 minute. Current is {elements}"); } } watcherTotal.Stop(); diff --git a/tests/net/KNetTestSerDes/Program.cs b/tests/net/KNetTestSerDes/Program.cs index f558f9e7dd..40a1680d86 100644 --- a/tests/net/KNetTestSerDes/Program.cs +++ b/tests/net/KNetTestSerDes/Program.cs @@ -18,102 +18,103 @@ using MASES.KNet.Serialization; using MASES.KNet.TestCommon; +using System; using System.Linq; namespace MASES.KNetTestAdmin { class Program { - const string theServer = "localhost:9092"; - const string theTopic = "myTopicAdmin"; - - static string serverToUse = theServer; - static string topicToUse = theTopic; - static void Main(string[] args) { SharedKNetCore.Create(); - var appArgs = SharedKNetCore.FilteredArgs; - byte[] bb, bb1; + try + { + byte[] bb, bb1; - bb = KNetSerialization.SerializeBoolean(false, "test", false); - bb1 = KNetSerialization.SerializeBoolean(true, "test", false); - if (!bb.SequenceEqual(bb1)) throw new System.Exception(); + bb = KNetSerialization.SerializeBoolean(false, "test", false); + bb1 = KNetSerialization.SerializeBoolean(true, "test", false); + if (!bb.SequenceEqual(bb1)) throw new System.Exception(); - if (KNetSerialization.DeserializeBoolean(true, "test", bb) != false) throw new System.Exception(); + if (KNetSerialization.DeserializeBoolean(true, "test", bb) != false) throw new System.Exception(); - bb = KNetSerialization.SerializeBoolean(false, "test", true); - bb1 = KNetSerialization.SerializeBoolean(true, "test", true); - if (!bb.SequenceEqual(bb1)) throw new System.Exception(); + bb = KNetSerialization.SerializeBoolean(false, "test", true); + bb1 = KNetSerialization.SerializeBoolean(true, "test", true); + if (!bb.SequenceEqual(bb1)) throw new System.Exception(); - if (KNetSerialization.DeserializeBoolean(true, "test", bb) != true) throw new System.Exception(); + if (KNetSerialization.DeserializeBoolean(true, "test", bb) != true) throw new System.Exception(); - const int cycles = 100; + const int cycles = 100; - long cycleDelta = short.MaxValue / cycles; + long cycleDelta = short.MaxValue / cycles; - for (short i = 0; i < cycles; i++) - { - short val = (short)(short.MinValue + i * (short)cycleDelta); + for (short i = 0; i < cycles; i++) + { + short val = (short)(short.MinValue + i * (short)cycleDelta); - bb = KNetSerialization.SerializeShort(false, "test", val); - bb1 = KNetSerialization.SerializeShort(true, "test", val); - if (!bb.SequenceEqual(bb1)) throw new System.Exception(); + bb = KNetSerialization.SerializeShort(false, "test", val); + bb1 = KNetSerialization.SerializeShort(true, "test", val); + if (!bb.SequenceEqual(bb1)) throw new System.Exception(); - if (KNetSerialization.DeserializeShort(true, "test", bb) != val) throw new System.Exception(); - } + if (KNetSerialization.DeserializeShort(true, "test", bb) != val) throw new System.Exception(); + } - cycleDelta = int.MaxValue / cycles; + cycleDelta = int.MaxValue / cycles; - for (int i = 0; i < cycles; i++) - { - int val = int.MinValue + i * (int)cycleDelta; + for (int i = 0; i < cycles; i++) + { + int val = int.MinValue + i * (int)cycleDelta; - bb = KNetSerialization.SerializeInt(false, "test", val); - bb1 = KNetSerialization.SerializeInt(true, "test", val); - if (!bb.SequenceEqual(bb1)) throw new System.Exception(); + bb = KNetSerialization.SerializeInt(false, "test", val); + bb1 = KNetSerialization.SerializeInt(true, "test", val); + if (!bb.SequenceEqual(bb1)) throw new System.Exception(); - if (KNetSerialization.DeserializeInt(true, "test", bb) != val) throw new System.Exception(); - } + if (KNetSerialization.DeserializeInt(true, "test", bb) != val) throw new System.Exception(); + } - cycleDelta = long.MaxValue / cycles; + cycleDelta = long.MaxValue / cycles; - for (long i = 0; i < cycles; i++) - { - long val = long.MinValue + i * (long)cycleDelta; + for (long i = 0; i < cycles; i++) + { + long val = long.MinValue + i * (long)cycleDelta; - bb = KNetSerialization.SerializeLong(false, "test", val); - bb1 = KNetSerialization.SerializeLong(true, "test", val); - if (!bb.SequenceEqual(bb1)) throw new System.Exception(); + bb = KNetSerialization.SerializeLong(false, "test", val); + bb1 = KNetSerialization.SerializeLong(true, "test", val); + if (!bb.SequenceEqual(bb1)) throw new System.Exception(); - if (KNetSerialization.DeserializeLong(true, "test", bb) != val) throw new System.Exception(); - } + if (KNetSerialization.DeserializeLong(true, "test", bb) != val) throw new System.Exception(); + } - float cycleDeltaF = float.MaxValue / cycles; + float cycleDeltaF = float.MaxValue / cycles; - for (long i = 0; i < cycles; i++) - { - float val = float.MinValue + i * cycleDeltaF; + for (long i = 0; i < cycles; i++) + { + float val = float.MinValue + i * cycleDeltaF; - bb = KNetSerialization.SerializeFloat(false, "test", val); - bb1 = KNetSerialization.SerializeFloat(true, "test", val); - if (!bb.SequenceEqual(bb1)) throw new System.Exception(); + bb = KNetSerialization.SerializeFloat(false, "test", val); + bb1 = KNetSerialization.SerializeFloat(true, "test", val); + if (!bb.SequenceEqual(bb1)) throw new System.Exception(); - if (KNetSerialization.DeserializeFloat(true, "test", bb) != val) throw new System.Exception(); - } + if (KNetSerialization.DeserializeFloat(true, "test", bb) != val) throw new System.Exception(); + } - double cycleDeltaD = double.MaxValue / cycles; + double cycleDeltaD = double.MaxValue / cycles; - for (long i = 0; i < cycles; i++) - { - double val = double.MinValue + i * cycleDeltaD; + for (long i = 0; i < cycles; i++) + { + double val = double.MinValue + i * cycleDeltaD; - bb = KNetSerialization.SerializeDouble(false, "test", val); - bb1 = KNetSerialization.SerializeDouble(true, "test", val); - if (!bb.SequenceEqual(bb1)) throw new System.Exception(); + bb = KNetSerialization.SerializeDouble(false, "test", val); + bb1 = KNetSerialization.SerializeDouble(true, "test", val); + if (!bb.SequenceEqual(bb1)) throw new System.Exception(); - if (KNetSerialization.DeserializeDouble(true, "test", bb) != val) throw new System.Exception(); + if (KNetSerialization.DeserializeDouble(true, "test", bb) != val) throw new System.Exception(); + } + } + catch + { + Environment.ExitCode = 1; } } } From 05263be7505e3b10924fe0d701e63af7510f3be5 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Tue, 25 Jun 2024 05:02:42 +0200 Subject: [PATCH 04/52] Reduced matrix size --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4155fe5bc8..8f92b71aa4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -289,7 +289,7 @@ jobs: framework: [ 'net6.0', 'net8.0' ] buffered: [ 'runBuffered', ''] extraValue: [ '', 'withBigBigExtraValue' ] - jdk_vendor: [ 'temurin', 'zulu', 'microsoft', 'corretto', 'oracle'] + jdk_vendor: [ 'temurin', 'zulu', 'oracle'] #removed 'microsoft', 'corretto', to reduce matrix size jdk_version: [ '11', '17', '21' ] # only LTS versions exclude: - jdk_vendor: oracle @@ -347,7 +347,7 @@ jobs: framework: [ 'net462', 'net6.0', 'net8.0' ] buffered: [ 'runBuffered', ''] extraValue: [ '', 'withBigBigExtraValue' ] - jdk_vendor: [ 'temurin', 'zulu', 'microsoft', 'corretto', 'oracle'] + jdk_vendor: [ 'temurin', 'zulu', 'oracle'] #removed 'microsoft', 'corretto', to reduce matrix size jdk_version: [ '11', '17', '21' ] # only LTS versions exclude: - os: macos-latest From 12d400f9abb40a95ce78fdb88031e9678d646688 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Tue, 25 Jun 2024 16:33:39 +0200 Subject: [PATCH 05/52] Double wait time --- tests/net/KNetTest/Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/net/KNetTest/Program.cs b/tests/net/KNetTest/Program.cs index c4bfbf445e..4f2fc3da64 100644 --- a/tests/net/KNetTest/Program.cs +++ b/tests/net/KNetTest/Program.cs @@ -458,7 +458,7 @@ static void ConsumeSomething() watcher.Stop(); } cycle++; - if (elements >= 0 && cycle == 60 * 5) + if (elements >= 0 && cycle == 2 * 60 * 5) { throw new InvalidOperationException($"Forcibly exit since no {NonParallelLimit} record was received within 1 minute. Current is {elements}"); } @@ -668,7 +668,7 @@ static void ConsumeSomethingBuffered() watcher.Stop(); } cycle++; - if (elements >= 0 && cycle == 60 * 5) + if (elements >= 0 && cycle == 2 * 60 * 5) { throw new InvalidOperationException($"Forcibly exit since no {NonParallelLimit} record was received within 1 minute. Current is {elements}"); } From f79ed0ebfb554b8a279c68da2a3c0e55c155e636 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Tue, 25 Jun 2024 17:04:28 +0200 Subject: [PATCH 06/52] Changed cycle check and wait subscription --- .github/workflows/build.yaml | 6 ++-- tests/net/KNetTest/Program.cs | 58 ++++++++++++++++++++++------------- 2 files changed, 39 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8f92b71aa4..3053f4b0e8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -320,7 +320,7 @@ jobs: - name: Executing KNetTest on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' || matrix.os == 'macos-13' }} continue-on-error: true - run: dotnet ./bin/${{ matrix.framework }}/KNetTest.dll localhost:9092 randomizeTopicName ${{ matrix.buffered }} ${{ matrix.extraValue }} + run: dotnet ./bin/${{ matrix.framework }}/KNetTest.dll localhost:9092 useConsumeCallback randomizeTopicName ${{ matrix.buffered }} ${{ matrix.extraValue }} env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} @@ -400,13 +400,13 @@ jobs: - name: Executing KNetTest on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} if: ${{ matrix.os != 'windows-latest' }} shell: pwsh - run: dotnet ${{ github.workspace }}/bin/${{ matrix.framework }}/KNetTest.dll localhost:9092 randomizeTopicName ${{ matrix.buffered }} ${{ matrix.extraValue }} + run: dotnet ${{ github.workspace }}/bin/${{ matrix.framework }}/KNetTest.dll localhost:9092 useConsumeCallback randomizeTopicName ${{ matrix.buffered }} ${{ matrix.extraValue }} env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - name: Executing KNetTest on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} if: ${{ matrix.os == 'windows-latest' }} shell: pwsh - run: ${{ github.workspace }}/bin/${{ matrix.framework }}/KNetTest.exe localhost:9092 randomizeTopicName ${{ matrix.buffered }} ${{ matrix.extraValue }} + run: ${{ github.workspace }}/bin/${{ matrix.framework }}/KNetTest.exe localhost:9092 useConsumeCallback randomizeTopicName ${{ matrix.buffered }} ${{ matrix.extraValue }} env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} diff --git a/tests/net/KNetTest/Program.cs b/tests/net/KNetTest/Program.cs index 4f2fc3da64..7edcaf67a2 100644 --- a/tests/net/KNetTest/Program.cs +++ b/tests/net/KNetTest/Program.cs @@ -41,7 +41,8 @@ class Program static bool withBigBigExtraValue = false; static bool consoleOutput = System.Diagnostics.Debugger.IsAttached ? true : false; static bool runBuffered = false; - static bool useCallback = false; + static bool useProduceCallback = false; + static bool useConsumeCallback = false; static bool onlyProduce = false; static bool flushWhileSend = false; static bool withAck = false; @@ -120,7 +121,8 @@ static void Main(string[] args) { if (args[i] == "runBuffered") { runBuffered = true; continue; } if (args[i] == "consoleOutput") { consoleOutput = true; continue; } - if (args[i] == "useCallback") { useCallback = true; continue; } + if (args[i] == "useProduceCallback") { useProduceCallback = true; continue; } + if (args[i] == "useConsumeCallback") { useConsumeCallback = true; continue; } if (args[i] == "withBigExtraValue") { withBigExtraValue = true; NonParallelLimit /= 10; continue; } if (args[i] == "withBigBigExtraValue") { withBigBigExtraValue = true; NonParallelLimit /= 100; continue; } if (args[i] == "onlyProduce") { onlyProduce = true; continue; } @@ -305,7 +307,7 @@ static void ProduceSomething() { int i = 0; Callback callback = null; - if (useCallback) + if (useProduceCallback) { callback = new Callback() { @@ -323,7 +325,7 @@ static void ProduceSomething() { watcher.Start(); var record = producer.NewRecord(topicToUse, i.ToString(), new TestType(i, withBigExtraValue, withBigBigExtraValue)); - var result = useCallback ? producer.Send(record, callback) : producer.Send(record); + var result = useProduceCallback ? producer.Send(record, callback) : producer.Send(record); if (!runInParallel && _firstOffset == -1) { _firstOffset = result.Get().Offset(); @@ -348,7 +350,7 @@ static void ProduceSomething() } finally { - if (useCallback) callback.Dispose(); + if (useProduceCallback) callback.Dispose(); if (i != 0) Console.WriteLine($"Flushed {i} elements in {watcher.Elapsed}, produce mean time is {TimeSpan.FromTicks(watcher.ElapsedTicks / i)} with mean JNI Calls {baseJNICalls / i}"); } } @@ -396,8 +398,9 @@ static void ConsumeSomething() var valueDeserializer = JsonSerDes.Value.NewByteArraySerDes(); ConsumerRebalanceListener rebalanceListener = null; KNetConsumer consumer = null; + ManualResetEvent manualResetEvent = new ManualResetEvent(false); - if (useCallback) + if (useConsumeCallback) { rebalanceListener = new ConsumerRebalanceListener() { @@ -408,6 +411,7 @@ static void ConsumeSomething() OnOnPartitionsAssigned = (o) => { Console.WriteLine("Assigned: {0}", o.ToString()); + manualResetEvent.Set(); } }; } @@ -422,7 +426,7 @@ static void ConsumeSomething() { if (runInParallel) { - if (useCallback) consumer.Subscribe(topics, rebalanceListener); + if (useConsumeCallback) consumer.Subscribe(topics, rebalanceListener); else consumer.Subscribe(topics); } else @@ -432,16 +436,21 @@ static void ConsumeSomething() if (_firstOffset != -1) { consumer.Seek(tp, _firstOffset); + Console.WriteLine("Seek to: {0}", _firstOffset); } else { consumer.SeekToBeginning(Collections.Singleton(tp)); + Console.WriteLine("SeekToBeginning"); } } - int cycle = 0; + if (useConsumeCallback) manualResetEvent.WaitOne(); + const int checkTime = 200; + const int waitTime = 2 * 60 * 1000; + Stopwatch swCycleTime = Stopwatch.StartNew(); while (runInParallel ? !resetEvent.WaitOne(0) : elements < NonParallelLimit) { - var records = consumer.Poll((long)TimeSpan.FromMilliseconds(200).TotalMilliseconds); + var records = consumer.Poll((long)TimeSpan.FromMilliseconds(checkTime).TotalMilliseconds); watcherTotal.Start(); #if NET7_0_OR_GREATER foreach (var item in records.ApplyPrefetch(withPrefetch, prefetchThreshold: 0)) @@ -457,10 +466,9 @@ static void ConsumeSomething() if (consoleOutput) Console.WriteLine(str); watcher.Stop(); } - cycle++; - if (elements >= 0 && cycle == 2 * 60 * 5) + if (!runInParallel && swCycleTime.ElapsedMilliseconds > waitTime) { - throw new InvalidOperationException($"Forcibly exit since no {NonParallelLimit} record was received within 1 minute. Current is {elements}"); + throw new InvalidOperationException($"Forcibly exit since no {NonParallelLimit} record was received within {waitTime} ms. Current received is {elements}"); } } watcherTotal.Stop(); @@ -515,7 +523,7 @@ static void ProduceSomethingBuffered() { int i = 0; Callback callback = null; - if (useCallback) + if (useProduceCallback) { callback = new Callback() { @@ -533,7 +541,7 @@ static void ProduceSomethingBuffered() { watcher.Start(); var record = producer.NewRecord(topicToUse, i.ToString(), new TestType(i, withBigExtraValue, withBigBigExtraValue)); - var result = useCallback ? producer.Send(record, callback) : producer.Send(record); + var result = useProduceCallback ? producer.Send(record, callback) : producer.Send(record); if (!runInParallel && _firstOffset == -1) { _firstOffset = result.Get().Offset(); @@ -558,7 +566,7 @@ static void ProduceSomethingBuffered() } finally { - if (useCallback) callback.Dispose(); + if (useProduceCallback) callback.Dispose(); if (i != 0) Console.WriteLine($"Flushed {i} elements in {watcher.Elapsed}, produce mean time is {TimeSpan.FromTicks(watcher.ElapsedTicks / i)} with mean JNI Calls {baseJNICalls / i}"); } } @@ -606,8 +614,9 @@ static void ConsumeSomethingBuffered() var valueDeserializer = JsonSerDes.Value.NewByteBufferSerDes(); ConsumerRebalanceListener rebalanceListener = null; KNetConsumerValueBuffered consumer = null; + ManualResetEvent manualResetEvent = new ManualResetEvent(false); - if (useCallback) + if (useConsumeCallback) { rebalanceListener = new ConsumerRebalanceListener() { @@ -618,6 +627,7 @@ static void ConsumeSomethingBuffered() OnOnPartitionsAssigned = (o) => { Console.WriteLine("Assigned: {0}", o.ToString()); + manualResetEvent.Set(); } }; } @@ -632,7 +642,7 @@ static void ConsumeSomethingBuffered() { if (runInParallel) { - if (useCallback) consumer.Subscribe(topics, rebalanceListener); + if (useConsumeCallback) consumer.Subscribe(topics, rebalanceListener); else consumer.Subscribe(topics); } else @@ -642,16 +652,21 @@ static void ConsumeSomethingBuffered() if (_firstOffset != -1) { consumer.Seek(tp, _firstOffset); + Console.WriteLine("Seek to: {0}", _firstOffset); } else { consumer.SeekToBeginning(Collections.Singleton(tp)); + Console.WriteLine("SeekToBeginning"); } } - int cycle = 0; + if (useConsumeCallback) manualResetEvent.WaitOne(); + const int checkTime = 200; + const int waitTime = 2 * 60 * 1000; + Stopwatch swCycleTime = Stopwatch.StartNew(); while (runInParallel ? !resetEvent.WaitOne(0) : elements < NonParallelLimit) { - var records = consumer.Poll((long)TimeSpan.FromMilliseconds(200).TotalMilliseconds); + var records = consumer.Poll((long)TimeSpan.FromMilliseconds(checkTime).TotalMilliseconds); watcherTotal.Start(); #if NET7_0_OR_GREATER foreach (var item in records.ApplyPrefetch(withPrefetch, prefetchThreshold: 0)) @@ -667,10 +682,9 @@ static void ConsumeSomethingBuffered() if (consoleOutput) Console.WriteLine(str); watcher.Stop(); } - cycle++; - if (elements >= 0 && cycle == 2 * 60 * 5) + if (!runInParallel && swCycleTime.ElapsedMilliseconds > waitTime) { - throw new InvalidOperationException($"Forcibly exit since no {NonParallelLimit} record was received within 1 minute. Current is {elements}"); + throw new InvalidOperationException($"Forcibly exit since no {NonParallelLimit} record was received within {waitTime} ms. Current received is {elements}"); } } watcherTotal.Stop(); From 556dec6b70f4716a5a57c9d8998d888dce299ba1 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Tue, 25 Jun 2024 17:10:41 +0200 Subject: [PATCH 07/52] Fix windows execution --- .github/workflows/build.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3053f4b0e8..bff75b8ccd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -378,11 +378,19 @@ jobs: java-version: ${{ matrix.jdk_version }} - name: Executing KNetTestSerDes on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} + if: ${{ matrix.os != 'windows-latest' }} shell: pwsh run: dotnet ${{ github.workspace }}/bin/${{ matrix.framework }}/KNetTestSerDes.dll env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} + - name: Executing KNetTestSerDes on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} + if: ${{ matrix.os == 'windows-latest' }} + shell: pwsh + run: ${{ github.workspace }}/bin/${{ matrix.framework }}/KNetTestSerDes.exe + env: + JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} + - name: Authenticate to GitHub run: dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/masesgroup/index.json" From 36bcf48de87b660d9d3c8327433b00bdc0886a93 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Tue, 25 Jun 2024 17:28:29 +0200 Subject: [PATCH 08/52] Fix condition --- tests/net/KNetTest/Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/net/KNetTest/Program.cs b/tests/net/KNetTest/Program.cs index 7edcaf67a2..04a07749b3 100644 --- a/tests/net/KNetTest/Program.cs +++ b/tests/net/KNetTest/Program.cs @@ -444,7 +444,7 @@ static void ConsumeSomething() Console.WriteLine("SeekToBeginning"); } } - if (useConsumeCallback) manualResetEvent.WaitOne(); + if (runInParallel && useConsumeCallback) manualResetEvent.WaitOne(); const int checkTime = 200; const int waitTime = 2 * 60 * 1000; Stopwatch swCycleTime = Stopwatch.StartNew(); @@ -660,7 +660,7 @@ static void ConsumeSomethingBuffered() Console.WriteLine("SeekToBeginning"); } } - if (useConsumeCallback) manualResetEvent.WaitOne(); + if (runInParallel && useConsumeCallback) manualResetEvent.WaitOne(); const int checkTime = 200; const int waitTime = 2 * 60 * 1000; Stopwatch swCycleTime = Stopwatch.StartNew(); From 5bdfc26c380fc0721d22ebbe5a8d2faf944e4ed4 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Tue, 25 Jun 2024 17:50:58 +0200 Subject: [PATCH 09/52] Update path and expiration time --- .github/workflows/build.yaml | 2 +- tests/net/KNetTest/Program.cs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index bff75b8ccd..b7c055675c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -387,7 +387,7 @@ jobs: - name: Executing KNetTestSerDes on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} if: ${{ matrix.os == 'windows-latest' }} shell: pwsh - run: ${{ github.workspace }}/bin/${{ matrix.framework }}/KNetTestSerDes.exe + run: ${{ github.workspace }}\bin\${{ matrix.framework }}\KNetTestSerDes.exe env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} diff --git a/tests/net/KNetTest/Program.cs b/tests/net/KNetTest/Program.cs index 04a07749b3..d9a724d8e3 100644 --- a/tests/net/KNetTest/Program.cs +++ b/tests/net/KNetTest/Program.cs @@ -55,6 +55,7 @@ class Program static int NonParallelLimit = 100000; static long _firstOffset = -1; + static int waitMultiplier = 5; static string serverToUse = theServer; static string topicToUse = theTopic; @@ -446,7 +447,7 @@ static void ConsumeSomething() } if (runInParallel && useConsumeCallback) manualResetEvent.WaitOne(); const int checkTime = 200; - const int waitTime = 2 * 60 * 1000; + int waitTime = waitMultiplier * 60 * 1000; Stopwatch swCycleTime = Stopwatch.StartNew(); while (runInParallel ? !resetEvent.WaitOne(0) : elements < NonParallelLimit) { @@ -662,7 +663,7 @@ static void ConsumeSomethingBuffered() } if (runInParallel && useConsumeCallback) manualResetEvent.WaitOne(); const int checkTime = 200; - const int waitTime = 2 * 60 * 1000; + int waitTime = waitMultiplier * 60 * 1000; Stopwatch swCycleTime = Stopwatch.StartNew(); while (runInParallel ? !resetEvent.WaitOne(0) : elements < NonParallelLimit) { From a36dbbdba1f07548da397a4808bdb5825acee7a9 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Tue, 25 Jun 2024 17:56:49 +0200 Subject: [PATCH 10/52] Added logs --- .github/workflows/build.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b7c055675c..3e87dd3072 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -193,6 +193,7 @@ jobs: run: | Copy-Item src\container\config_container\zookeeper.properties -Destination bin\zookeeper.properties -Force Copy-Item src\container\config_container\server.properties -Destination bin\server.properties -Force + Copy-Item src\container\config_container\log4j.properties -Destination bin\log4j.properties -Force - name: Save KNet bin in cache uses: actions/cache/save@v4 @@ -400,8 +401,8 @@ jobs: - name: Start Kafka on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} shell: pwsh run: | - Start-Process -FilePath knet -ArgumentList ( 'zookeeperstart', '${{ github.workspace }}/bin/zookeeper.properties' ) - Start-Process -FilePath knet -ArgumentList ( 'kafkastart', '${{ github.workspace }}/bin/server.properties' ) + Start-Process -FilePath knet -ArgumentList ( 'zookeeperstart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/zookeeper.properties' ) + Start-Process -FilePath knet -ArgumentList ( 'kafkastart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/server.properties' ) env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} From 95dd1080f811971b47a53edb2ab4afcaab322218 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Tue, 25 Jun 2024 18:20:27 +0200 Subject: [PATCH 11/52] Report exception callstack --- tests/net/KNetTestSerDes/Program.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/net/KNetTestSerDes/Program.cs b/tests/net/KNetTestSerDes/Program.cs index 40a1680d86..ce9140b555 100644 --- a/tests/net/KNetTestSerDes/Program.cs +++ b/tests/net/KNetTestSerDes/Program.cs @@ -112,8 +112,9 @@ static void Main(string[] args) if (KNetSerialization.DeserializeDouble(true, "test", bb) != val) throw new System.Exception(); } } - catch + catch (Exception e) { + Console.WriteLine(e.ToString()); Environment.ExitCode = 1; } } From 33da6dda005a365f29e3c3042d81d310261109b7 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Tue, 25 Jun 2024 18:58:22 +0200 Subject: [PATCH 12/52] Do not emit error if some element were received --- .github/workflows/build.yaml | 1 - tests/net/KNetTest/Program.cs | 16 ++++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3e87dd3072..a04cf0a2ad 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -320,7 +320,6 @@ jobs: - name: Executing KNetTest on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' || matrix.os == 'macos-13' }} - continue-on-error: true run: dotnet ./bin/${{ matrix.framework }}/KNetTest.dll localhost:9092 useConsumeCallback randomizeTopicName ${{ matrix.buffered }} ${{ matrix.extraValue }} env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} diff --git a/tests/net/KNetTest/Program.cs b/tests/net/KNetTest/Program.cs index d9a724d8e3..bdecf32368 100644 --- a/tests/net/KNetTest/Program.cs +++ b/tests/net/KNetTest/Program.cs @@ -469,7 +469,13 @@ static void ConsumeSomething() } if (!runInParallel && swCycleTime.ElapsedMilliseconds > waitTime) { - throw new InvalidOperationException($"Forcibly exit since no {NonParallelLimit} record was received within {waitTime} ms. Current received is {elements}"); + var str = $"Forcibly exit since no {NonParallelLimit} record was received within {waitTime} ms. Current received is {elements}"; + if (elements != 0) + { + Console.WriteLine(str); + break; + } + else throw new InvalidOperationException(str); } } watcherTotal.Stop(); @@ -685,7 +691,13 @@ static void ConsumeSomethingBuffered() } if (!runInParallel && swCycleTime.ElapsedMilliseconds > waitTime) { - throw new InvalidOperationException($"Forcibly exit since no {NonParallelLimit} record was received within {waitTime} ms. Current received is {elements}"); + var str = $"Forcibly exit since no {NonParallelLimit} record was received within {waitTime} ms. Current received is {elements}"; + if (elements != 0) + { + Console.WriteLine(str); + break; + } + else throw new InvalidOperationException(str); } } watcherTotal.Stop(); From 4f7330e2235394ff0818fc689ebe0016d04e2478 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Tue, 25 Jun 2024 19:01:30 +0200 Subject: [PATCH 13/52] Add specific error for GlobalInstance --- tests/net/Common/SharedKNetCore.cs | 5 +++++ tests/net/KNetTestSerDes/Program.cs | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/net/Common/SharedKNetCore.cs b/tests/net/Common/SharedKNetCore.cs index 5449547932..60947ef90f 100644 --- a/tests/net/Common/SharedKNetCore.cs +++ b/tests/net/Common/SharedKNetCore.cs @@ -17,6 +17,7 @@ */ using Java.Lang; +using Javax.Security.Auth.Login; using System; namespace MASES.KNet.TestCommon @@ -27,6 +28,10 @@ public static void Create() { ApplicationJarRootPath = Const.DefaultJarsPath; CreateGlobalInstance(); + if (GlobalInstance == null) + { + throw new InvalidOperationException("Failed to create GlobalInstance"); + } } public static int ManageException(System.Exception e) diff --git a/tests/net/KNetTestSerDes/Program.cs b/tests/net/KNetTestSerDes/Program.cs index ce9140b555..0175712d30 100644 --- a/tests/net/KNetTestSerDes/Program.cs +++ b/tests/net/KNetTestSerDes/Program.cs @@ -27,10 +27,10 @@ class Program { static void Main(string[] args) { - SharedKNetCore.Create(); - try { + SharedKNetCore.Create(); + byte[] bb, bb1; bb = KNetSerialization.SerializeBoolean(false, "test", false); From 6d69abb924a42a1035e64eb47353475890b7be4f Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Tue, 25 Jun 2024 19:19:00 +0200 Subject: [PATCH 14/52] Fully reviewed test folder --- .../KNetBenchmark/KNetBenchmark.csproj | 2 +- .../{ => Benchmarks}/KNetBenchmark/Program.cs | 0 .../KNetBenchmark/ProgramConfluent.cs | 0 .../KNetBenchmark/ProgramInit.cs | 0 .../KNetBenchmark/ProgramKNet.cs | 0 .../KNetBenchmark/ProgramKafka.cs | 0 .../KNetBenchmark/ProgramSupport.cs | 0 .../KNetRoundTripBenchmark.csproj | 2 +- .../KNetRoundTripBenchmark/Program.cs | 0 .../KNetTopicCopyBenchmark.csproj | 2 +- .../KNetTopicCopyBenchmark/Program.cs | 0 tests/net/Common/Common.props | 14 +- .../KNetConnectTest/KNetConnectSink.cs | 0 .../KNetConnectTest/KNetConnectSource.cs | 0 .../KNetConnectTest/KNetConnectTest.csproj | 4 +- .../KNetConnectTest/TestFileInput.txt | 0 .../connect-knet-sink.properties | 0 .../connect-knet-source.properties | 0 .../connect-standalone.properties | 0 .../KNetClassicTest/KNetClassicTest.csproj | 4 +- .../{ => General}/KNetClassicTest/Program.cs | 0 .../KNetCompactedReplicatorTest.csproj | 6 +- .../KNetCompactedReplicatorTest/Program.cs | 0 .../{ => General}/KNetTest/KNetTest.csproj | 6 +- tests/net/{ => General}/KNetTest/Program.cs | 0 .../KNetTestAdmin/KNetTestAdmin.csproj | 4 +- .../{ => General}/KNetTestAdmin/Program.cs | 0 .../KNetTestSerDes/KNetTestSerDes.csproj | 4 +- .../{ => General}/KNetTestSerDes/Program.cs | 0 tests/net/KNetTest.sln | 167 +++++++++--------- .../KNetTestKNetStreams.csproj | 4 +- .../KNetTestKNetStreams/Program.cs | 0 .../KNetTestStreams/KNetTestStreams.csproj | 4 +- .../{ => Streams}/KNetTestStreams/Program.cs | 0 34 files changed, 113 insertions(+), 110 deletions(-) rename tests/net/{ => Benchmarks}/KNetBenchmark/KNetBenchmark.csproj (89%) rename tests/net/{ => Benchmarks}/KNetBenchmark/Program.cs (100%) rename tests/net/{ => Benchmarks}/KNetBenchmark/ProgramConfluent.cs (100%) rename tests/net/{ => Benchmarks}/KNetBenchmark/ProgramInit.cs (100%) rename tests/net/{ => Benchmarks}/KNetBenchmark/ProgramKNet.cs (100%) rename tests/net/{ => Benchmarks}/KNetBenchmark/ProgramKafka.cs (100%) rename tests/net/{ => Benchmarks}/KNetBenchmark/ProgramSupport.cs (100%) rename tests/net/{ => Benchmarks}/KNetRoundTripBenchmark/KNetRoundTripBenchmark.csproj (94%) rename tests/net/{ => Benchmarks}/KNetRoundTripBenchmark/Program.cs (100%) rename tests/net/{ => Benchmarks}/KNetTopicCopyBenchmark/KNetTopicCopyBenchmark.csproj (94%) rename tests/net/{ => Benchmarks}/KNetTopicCopyBenchmark/Program.cs (100%) rename tests/net/{ => Connect}/KNetConnectTest/KNetConnectSink.cs (100%) rename tests/net/{ => Connect}/KNetConnectTest/KNetConnectSource.cs (100%) rename tests/net/{ => Connect}/KNetConnectTest/KNetConnectTest.csproj (89%) rename tests/net/{ => Connect}/KNetConnectTest/TestFileInput.txt (100%) rename tests/net/{ => Connect}/KNetConnectTest/connect-knet-sink.properties (100%) rename tests/net/{ => Connect}/KNetConnectTest/connect-knet-source.properties (100%) rename tests/net/{ => Connect}/KNetConnectTest/connect-standalone.properties (100%) rename tests/net/{ => General}/KNetClassicTest/KNetClassicTest.csproj (74%) rename tests/net/{ => General}/KNetClassicTest/Program.cs (100%) rename tests/net/{ => General}/KNetCompactedReplicatorTest/KNetCompactedReplicatorTest.csproj (64%) rename tests/net/{ => General}/KNetCompactedReplicatorTest/Program.cs (100%) rename tests/net/{ => General}/KNetTest/KNetTest.csproj (60%) rename tests/net/{ => General}/KNetTest/Program.cs (100%) rename tests/net/{ => General}/KNetTestAdmin/KNetTestAdmin.csproj (72%) rename tests/net/{ => General}/KNetTestAdmin/Program.cs (100%) rename tests/net/{ => General}/KNetTestSerDes/KNetTestSerDes.csproj (73%) rename tests/net/{ => General}/KNetTestSerDes/Program.cs (100%) rename tests/net/{ => Streams}/KNetTestKNetStreams/KNetTestKNetStreams.csproj (75%) rename tests/net/{ => Streams}/KNetTestKNetStreams/Program.cs (100%) rename tests/net/{ => Streams}/KNetTestStreams/KNetTestStreams.csproj (74%) rename tests/net/{ => Streams}/KNetTestStreams/Program.cs (100%) diff --git a/tests/net/KNetBenchmark/KNetBenchmark.csproj b/tests/net/Benchmarks/KNetBenchmark/KNetBenchmark.csproj similarity index 89% rename from tests/net/KNetBenchmark/KNetBenchmark.csproj rename to tests/net/Benchmarks/KNetBenchmark/KNetBenchmark.csproj index 8d514b5a83..696c20405c 100644 --- a/tests/net/KNetBenchmark/KNetBenchmark.csproj +++ b/tests/net/Benchmarks/KNetBenchmark/KNetBenchmark.csproj @@ -1,5 +1,5 @@  - + KNetBenchmark Exe diff --git a/tests/net/KNetBenchmark/Program.cs b/tests/net/Benchmarks/KNetBenchmark/Program.cs similarity index 100% rename from tests/net/KNetBenchmark/Program.cs rename to tests/net/Benchmarks/KNetBenchmark/Program.cs diff --git a/tests/net/KNetBenchmark/ProgramConfluent.cs b/tests/net/Benchmarks/KNetBenchmark/ProgramConfluent.cs similarity index 100% rename from tests/net/KNetBenchmark/ProgramConfluent.cs rename to tests/net/Benchmarks/KNetBenchmark/ProgramConfluent.cs diff --git a/tests/net/KNetBenchmark/ProgramInit.cs b/tests/net/Benchmarks/KNetBenchmark/ProgramInit.cs similarity index 100% rename from tests/net/KNetBenchmark/ProgramInit.cs rename to tests/net/Benchmarks/KNetBenchmark/ProgramInit.cs diff --git a/tests/net/KNetBenchmark/ProgramKNet.cs b/tests/net/Benchmarks/KNetBenchmark/ProgramKNet.cs similarity index 100% rename from tests/net/KNetBenchmark/ProgramKNet.cs rename to tests/net/Benchmarks/KNetBenchmark/ProgramKNet.cs diff --git a/tests/net/KNetBenchmark/ProgramKafka.cs b/tests/net/Benchmarks/KNetBenchmark/ProgramKafka.cs similarity index 100% rename from tests/net/KNetBenchmark/ProgramKafka.cs rename to tests/net/Benchmarks/KNetBenchmark/ProgramKafka.cs diff --git a/tests/net/KNetBenchmark/ProgramSupport.cs b/tests/net/Benchmarks/KNetBenchmark/ProgramSupport.cs similarity index 100% rename from tests/net/KNetBenchmark/ProgramSupport.cs rename to tests/net/Benchmarks/KNetBenchmark/ProgramSupport.cs diff --git a/tests/net/KNetRoundTripBenchmark/KNetRoundTripBenchmark.csproj b/tests/net/Benchmarks/KNetRoundTripBenchmark/KNetRoundTripBenchmark.csproj similarity index 94% rename from tests/net/KNetRoundTripBenchmark/KNetRoundTripBenchmark.csproj rename to tests/net/Benchmarks/KNetRoundTripBenchmark/KNetRoundTripBenchmark.csproj index 2d58d2c82e..edfcdbfaad 100644 --- a/tests/net/KNetRoundTripBenchmark/KNetRoundTripBenchmark.csproj +++ b/tests/net/Benchmarks/KNetRoundTripBenchmark/KNetRoundTripBenchmark.csproj @@ -1,5 +1,5 @@  - + KNetRoundTripBenchmark Exe diff --git a/tests/net/KNetRoundTripBenchmark/Program.cs b/tests/net/Benchmarks/KNetRoundTripBenchmark/Program.cs similarity index 100% rename from tests/net/KNetRoundTripBenchmark/Program.cs rename to tests/net/Benchmarks/KNetRoundTripBenchmark/Program.cs diff --git a/tests/net/KNetTopicCopyBenchmark/KNetTopicCopyBenchmark.csproj b/tests/net/Benchmarks/KNetTopicCopyBenchmark/KNetTopicCopyBenchmark.csproj similarity index 94% rename from tests/net/KNetTopicCopyBenchmark/KNetTopicCopyBenchmark.csproj rename to tests/net/Benchmarks/KNetTopicCopyBenchmark/KNetTopicCopyBenchmark.csproj index 2a5aacb74f..bae71a5c09 100644 --- a/tests/net/KNetTopicCopyBenchmark/KNetTopicCopyBenchmark.csproj +++ b/tests/net/Benchmarks/KNetTopicCopyBenchmark/KNetTopicCopyBenchmark.csproj @@ -1,5 +1,5 @@  - + KNetTopicCopyBenchmark Exe diff --git a/tests/net/KNetTopicCopyBenchmark/Program.cs b/tests/net/Benchmarks/KNetTopicCopyBenchmark/Program.cs similarity index 100% rename from tests/net/KNetTopicCopyBenchmark/Program.cs rename to tests/net/Benchmarks/KNetTopicCopyBenchmark/Program.cs diff --git a/tests/net/Common/Common.props b/tests/net/Common/Common.props index d529364ea0..3269043b84 100644 --- a/tests/net/Common/Common.props +++ b/tests/net/Common/Common.props @@ -1,16 +1,16 @@ - + false - ..\..\..\src\net\Common\KNet.snk - ..\..\..\bin\ + $(SolutionDir)\..\..\src\net\Common\KNet.snk + $(SolutionDir)\..\..\bin\ - - - + + + - + \ No newline at end of file diff --git a/tests/net/KNetConnectTest/KNetConnectSink.cs b/tests/net/Connect/KNetConnectTest/KNetConnectSink.cs similarity index 100% rename from tests/net/KNetConnectTest/KNetConnectSink.cs rename to tests/net/Connect/KNetConnectTest/KNetConnectSink.cs diff --git a/tests/net/KNetConnectTest/KNetConnectSource.cs b/tests/net/Connect/KNetConnectTest/KNetConnectSource.cs similarity index 100% rename from tests/net/KNetConnectTest/KNetConnectSource.cs rename to tests/net/Connect/KNetConnectTest/KNetConnectSource.cs diff --git a/tests/net/KNetConnectTest/KNetConnectTest.csproj b/tests/net/Connect/KNetConnectTest/KNetConnectTest.csproj similarity index 89% rename from tests/net/KNetConnectTest/KNetConnectTest.csproj rename to tests/net/Connect/KNetConnectTest/KNetConnectTest.csproj index a5fb2f7d7c..52405eb948 100644 --- a/tests/net/KNetConnectTest/KNetConnectTest.csproj +++ b/tests/net/Connect/KNetConnectTest/KNetConnectTest.csproj @@ -1,7 +1,7 @@  - + - ..\..\binConnect\ + ..\..\..\..\binConnect\ KNetConnectTest MASES.KNetConnectTest KNetConnectTest - a test tool for KNet Connect diff --git a/tests/net/KNetConnectTest/TestFileInput.txt b/tests/net/Connect/KNetConnectTest/TestFileInput.txt similarity index 100% rename from tests/net/KNetConnectTest/TestFileInput.txt rename to tests/net/Connect/KNetConnectTest/TestFileInput.txt diff --git a/tests/net/KNetConnectTest/connect-knet-sink.properties b/tests/net/Connect/KNetConnectTest/connect-knet-sink.properties similarity index 100% rename from tests/net/KNetConnectTest/connect-knet-sink.properties rename to tests/net/Connect/KNetConnectTest/connect-knet-sink.properties diff --git a/tests/net/KNetConnectTest/connect-knet-source.properties b/tests/net/Connect/KNetConnectTest/connect-knet-source.properties similarity index 100% rename from tests/net/KNetConnectTest/connect-knet-source.properties rename to tests/net/Connect/KNetConnectTest/connect-knet-source.properties diff --git a/tests/net/KNetConnectTest/connect-standalone.properties b/tests/net/Connect/KNetConnectTest/connect-standalone.properties similarity index 100% rename from tests/net/KNetConnectTest/connect-standalone.properties rename to tests/net/Connect/KNetConnectTest/connect-standalone.properties diff --git a/tests/net/KNetClassicTest/KNetClassicTest.csproj b/tests/net/General/KNetClassicTest/KNetClassicTest.csproj similarity index 74% rename from tests/net/KNetClassicTest/KNetClassicTest.csproj rename to tests/net/General/KNetClassicTest/KNetClassicTest.csproj index 8643a4b5fe..094501ad40 100644 --- a/tests/net/KNetClassicTest/KNetClassicTest.csproj +++ b/tests/net/General/KNetClassicTest/KNetClassicTest.csproj @@ -1,5 +1,5 @@ - + KNetClassicTest Exe @@ -8,6 +8,6 @@ KNetClassicTest - a test tool for KNet Classic - + diff --git a/tests/net/KNetClassicTest/Program.cs b/tests/net/General/KNetClassicTest/Program.cs similarity index 100% rename from tests/net/KNetClassicTest/Program.cs rename to tests/net/General/KNetClassicTest/Program.cs diff --git a/tests/net/KNetCompactedReplicatorTest/KNetCompactedReplicatorTest.csproj b/tests/net/General/KNetCompactedReplicatorTest/KNetCompactedReplicatorTest.csproj similarity index 64% rename from tests/net/KNetCompactedReplicatorTest/KNetCompactedReplicatorTest.csproj rename to tests/net/General/KNetCompactedReplicatorTest/KNetCompactedReplicatorTest.csproj index ccdf4ccd72..db85a9fce5 100644 --- a/tests/net/KNetCompactedReplicatorTest/KNetCompactedReplicatorTest.csproj +++ b/tests/net/General/KNetCompactedReplicatorTest/KNetCompactedReplicatorTest.csproj @@ -1,5 +1,5 @@ - + KNetCompactedReplicatorTest Exe @@ -8,9 +8,9 @@ KNetCompactedReplicatorTest - a test tool for KNet - + - + diff --git a/tests/net/KNetCompactedReplicatorTest/Program.cs b/tests/net/General/KNetCompactedReplicatorTest/Program.cs similarity index 100% rename from tests/net/KNetCompactedReplicatorTest/Program.cs rename to tests/net/General/KNetCompactedReplicatorTest/Program.cs diff --git a/tests/net/KNetTest/KNetTest.csproj b/tests/net/General/KNetTest/KNetTest.csproj similarity index 60% rename from tests/net/KNetTest/KNetTest.csproj rename to tests/net/General/KNetTest/KNetTest.csproj index 3679ea8e6c..eaa0af8366 100644 --- a/tests/net/KNetTest/KNetTest.csproj +++ b/tests/net/General/KNetTest/KNetTest.csproj @@ -1,5 +1,5 @@ - + KNetTest Exe @@ -8,9 +8,9 @@ KNetTest - a test tool for KNet - + - + diff --git a/tests/net/KNetTest/Program.cs b/tests/net/General/KNetTest/Program.cs similarity index 100% rename from tests/net/KNetTest/Program.cs rename to tests/net/General/KNetTest/Program.cs diff --git a/tests/net/KNetTestAdmin/KNetTestAdmin.csproj b/tests/net/General/KNetTestAdmin/KNetTestAdmin.csproj similarity index 72% rename from tests/net/KNetTestAdmin/KNetTestAdmin.csproj rename to tests/net/General/KNetTestAdmin/KNetTestAdmin.csproj index 2b74168dc5..3b061a9abf 100644 --- a/tests/net/KNetTestAdmin/KNetTestAdmin.csproj +++ b/tests/net/General/KNetTestAdmin/KNetTestAdmin.csproj @@ -1,5 +1,5 @@ - + KNetTestAdmin Exe @@ -8,6 +8,6 @@ KNetTest - a test tool for KNet - + diff --git a/tests/net/KNetTestAdmin/Program.cs b/tests/net/General/KNetTestAdmin/Program.cs similarity index 100% rename from tests/net/KNetTestAdmin/Program.cs rename to tests/net/General/KNetTestAdmin/Program.cs diff --git a/tests/net/KNetTestSerDes/KNetTestSerDes.csproj b/tests/net/General/KNetTestSerDes/KNetTestSerDes.csproj similarity index 73% rename from tests/net/KNetTestSerDes/KNetTestSerDes.csproj rename to tests/net/General/KNetTestSerDes/KNetTestSerDes.csproj index de537ca14f..de3ed8a16f 100644 --- a/tests/net/KNetTestSerDes/KNetTestSerDes.csproj +++ b/tests/net/General/KNetTestSerDes/KNetTestSerDes.csproj @@ -1,5 +1,5 @@ - + KNetTestSerDes Exe @@ -8,6 +8,6 @@ KNetTestSerDes - a test tool for KNet - + diff --git a/tests/net/KNetTestSerDes/Program.cs b/tests/net/General/KNetTestSerDes/Program.cs similarity index 100% rename from tests/net/KNetTestSerDes/Program.cs rename to tests/net/General/KNetTestSerDes/Program.cs diff --git a/tests/net/KNetTest.sln b/tests/net/KNetTest.sln index df2e390353..2f821df2d5 100644 --- a/tests/net/KNetTest.sln +++ b/tests/net/KNetTest.sln @@ -3,32 +3,15 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.1.32319.34 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNetTest", "KNetTest\KNetTest.csproj", "{C556E8A0-8B06-4D5B-AEAD-B318B48DF150}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNet", "..\..\src\net\KNet\KNet.csproj", "{14871D50-7E4E-4BAE-8005-CA86E891F602}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNetTestStreams", "KNetTestStreams\KNetTestStreams.csproj", "{17E101E1-A0F8-44F0-929C-498E4A41F551}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNetTestAdmin", "KNetTestAdmin\KNetTestAdmin.csproj", "{DE8D288D-8438-42EA-892F-F59840CFE322}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNetBenchmark", "KNetBenchmark\KNetBenchmark.csproj", "{8A6C9438-A389-4563-98EE-1386E0E62AAA}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNetTopicCopyBenchmark", "KNetTopicCopyBenchmark\KNetTopicCopyBenchmark.csproj", "{C6A11273-A560-4BB1-9234-961D30824DAB}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test Benchmarks", "Test Benchmarks", "{14753FBA-8F9B-48A1-9983-7DC37CB32914}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Benchmarks", "Benchmarks", "{14753FBA-8F9B-48A1-9983-7DC37CB32914}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test General", "Test General", "{A77F1B9E-5576-46F0-BE58-C85FA9FA3A58}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "General", "General", "{A77F1B9E-5576-46F0-BE58-C85FA9FA3A58}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test Connect", "Test Connect", "{6421F571-315C-47BB-A9F9-4542759E968E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNetConnectTest", "KNetConnectTest\KNetConnectTest.csproj", "{7F3A2CE5-ADEE-426F-BE99-D899D87EFF2F}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Connect", "Connect", "{6421F571-315C-47BB-A9F9-4542759E968E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNetConnect", "..\..\src\net\KNetConnect\KNetConnect.csproj", "{969D44CC-1EE3-4176-B139-9B6860D88602}" - ProjectSection(ProjectDependencies) = postProject - {7F3A2CE5-ADEE-426F-BE99-D899D87EFF2F} = {7F3A2CE5-ADEE-426F-BE99-D899D87EFF2F} - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNetRoundTripBenchmark", "KNetRoundTripBenchmark\KNetRoundTripBenchmark.csproj", "{47D7A5D9-554E-47B8-B666-20E7D3DFE30F}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{345DA483-99E7-4FA0-A5D5-5EE62E49E668}" EndProject @@ -38,10 +21,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNet.Serialization.Protobuf EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNet.Serialization.Avro", "..\..\src\net\KNet.Serialization.Avro\KNet.Serialization.Avro.csproj", "{2C02FC8F-FF75-4963-8545-EE58C105025D}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNetClassicTest", "KNetClassicTest\KNetClassicTest.csproj", "{F915A488-956C-4B31-89FC-EB5DBC4AC73E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNetCompactedReplicatorTest", "KNetCompactedReplicatorTest\KNetCompactedReplicatorTest.csproj", "{245DDDD6-022A-4C2F-8769-FBB6CFDEC585}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNet.Serialization.MessagePack", "..\..\src\net\KNet.Serialization.MessagePack\KNet.Serialization.MessagePack.csproj", "{D39E1D83-C3FC-4482-83F5-DDE89B53BEA8}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Templates", "Templates", "{68128D24-3F72-4A25-A876-509F12F38E73}" @@ -56,11 +35,31 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "knetPipeStreamApp", "..\..\ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "knetProducerApp", "..\..\src\net\templates\templates\knetProducerApp\knetProducerApp.csproj", "{8E8EB519-70A3-487A-BB71-096988CCA6A9}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test Streams", "Test Streams", "{35AE6AB6-C68A-4605-9C66-EE652977C27A}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Streams", "Streams", "{35AE6AB6-C68A-4605-9C66-EE652977C27A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{3A8B1862-E4CB-4F06-9790-14FE91D8D93E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNetTestKNetStreams", "Streams\KNetTestKNetStreams\KNetTestKNetStreams.csproj", "{445E97F5-40B6-4076-835D-11B7BF43F9AD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNetTestStreams", "Streams\KNetTestStreams\KNetTestStreams.csproj", "{7E2FA3C5-C99A-4176-979C-D84F1F14B4DE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNetConnectTest", "Connect\KNetConnectTest\KNetConnectTest.csproj", "{58E26434-18AD-4F16-AA0C-DC39B99751B8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNetBenchmark", "Benchmarks\KNetBenchmark\KNetBenchmark.csproj", "{E111566D-7002-4C26-A0F6-FB3CED429A08}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNetRoundTripBenchmark", "Benchmarks\KNetRoundTripBenchmark\KNetRoundTripBenchmark.csproj", "{814798DE-6B17-4318-8392-2E9CDA6EED01}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNetTopicCopyBenchmark", "Benchmarks\KNetTopicCopyBenchmark\KNetTopicCopyBenchmark.csproj", "{064ECC10-79B3-40D8-A4AF-1F978CB46F42}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNetCompactedReplicatorTest", "General\KNetCompactedReplicatorTest\KNetCompactedReplicatorTest.csproj", "{5366F6CF-C488-4239-9448-C5D6E524E937}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNetClassicTest", "General\KNetClassicTest\KNetClassicTest.csproj", "{ABFF11A9-CF70-4FF1-9636-CE74243C8C0B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNetTest", "General\KNetTest\KNetTest.csproj", "{A3A01398-B1A3-44C1-865F-4E9DBDCD381B}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNetTestKNetStreams", "KNetTestKNetStreams\KNetTestKNetStreams.csproj", "{69DF3123-32D8-4583-9D76-A61A78DFF370}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNetTestAdmin", "General\KNetTestAdmin\KNetTestAdmin.csproj", "{BDC3FC68-09E4-4C3A-BF70-DB2B2C1BDE86}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNetTestSerDes", "KNetTestSerDes\KNetTestSerDes.csproj", "{CED323B6-506B-470C-9F26-0B77667C8598}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KNetTestSerDes", "General\KNetTestSerDes\KNetTestSerDes.csproj", "{20A0DA90-D4AB-45EE-874B-5B2D18D575F7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -68,42 +67,14 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C556E8A0-8B06-4D5B-AEAD-B318B48DF150}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C556E8A0-8B06-4D5B-AEAD-B318B48DF150}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C556E8A0-8B06-4D5B-AEAD-B318B48DF150}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C556E8A0-8B06-4D5B-AEAD-B318B48DF150}.Release|Any CPU.Build.0 = Release|Any CPU {14871D50-7E4E-4BAE-8005-CA86E891F602}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {14871D50-7E4E-4BAE-8005-CA86E891F602}.Debug|Any CPU.Build.0 = Debug|Any CPU {14871D50-7E4E-4BAE-8005-CA86E891F602}.Release|Any CPU.ActiveCfg = Release|Any CPU {14871D50-7E4E-4BAE-8005-CA86E891F602}.Release|Any CPU.Build.0 = Release|Any CPU - {17E101E1-A0F8-44F0-929C-498E4A41F551}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {17E101E1-A0F8-44F0-929C-498E4A41F551}.Debug|Any CPU.Build.0 = Debug|Any CPU - {17E101E1-A0F8-44F0-929C-498E4A41F551}.Release|Any CPU.ActiveCfg = Release|Any CPU - {17E101E1-A0F8-44F0-929C-498E4A41F551}.Release|Any CPU.Build.0 = Release|Any CPU - {DE8D288D-8438-42EA-892F-F59840CFE322}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DE8D288D-8438-42EA-892F-F59840CFE322}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DE8D288D-8438-42EA-892F-F59840CFE322}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DE8D288D-8438-42EA-892F-F59840CFE322}.Release|Any CPU.Build.0 = Release|Any CPU - {8A6C9438-A389-4563-98EE-1386E0E62AAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8A6C9438-A389-4563-98EE-1386E0E62AAA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8A6C9438-A389-4563-98EE-1386E0E62AAA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8A6C9438-A389-4563-98EE-1386E0E62AAA}.Release|Any CPU.Build.0 = Release|Any CPU - {C6A11273-A560-4BB1-9234-961D30824DAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C6A11273-A560-4BB1-9234-961D30824DAB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C6A11273-A560-4BB1-9234-961D30824DAB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C6A11273-A560-4BB1-9234-961D30824DAB}.Release|Any CPU.Build.0 = Release|Any CPU - {7F3A2CE5-ADEE-426F-BE99-D899D87EFF2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7F3A2CE5-ADEE-426F-BE99-D899D87EFF2F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7F3A2CE5-ADEE-426F-BE99-D899D87EFF2F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7F3A2CE5-ADEE-426F-BE99-D899D87EFF2F}.Release|Any CPU.Build.0 = Release|Any CPU {969D44CC-1EE3-4176-B139-9B6860D88602}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {969D44CC-1EE3-4176-B139-9B6860D88602}.Debug|Any CPU.Build.0 = Debug|Any CPU {969D44CC-1EE3-4176-B139-9B6860D88602}.Release|Any CPU.ActiveCfg = Release|Any CPU {969D44CC-1EE3-4176-B139-9B6860D88602}.Release|Any CPU.Build.0 = Release|Any CPU - {47D7A5D9-554E-47B8-B666-20E7D3DFE30F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {47D7A5D9-554E-47B8-B666-20E7D3DFE30F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {47D7A5D9-554E-47B8-B666-20E7D3DFE30F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {47D7A5D9-554E-47B8-B666-20E7D3DFE30F}.Release|Any CPU.Build.0 = Release|Any CPU {64C1B6AC-F7D8-43FD-BA1F-584EF5B5934A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64C1B6AC-F7D8-43FD-BA1F-584EF5B5934A}.Debug|Any CPU.Build.0 = Debug|Any CPU {64C1B6AC-F7D8-43FD-BA1F-584EF5B5934A}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -116,14 +87,6 @@ Global {2C02FC8F-FF75-4963-8545-EE58C105025D}.Debug|Any CPU.Build.0 = Debug|Any CPU {2C02FC8F-FF75-4963-8545-EE58C105025D}.Release|Any CPU.ActiveCfg = Release|Any CPU {2C02FC8F-FF75-4963-8545-EE58C105025D}.Release|Any CPU.Build.0 = Release|Any CPU - {F915A488-956C-4B31-89FC-EB5DBC4AC73E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F915A488-956C-4B31-89FC-EB5DBC4AC73E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F915A488-956C-4B31-89FC-EB5DBC4AC73E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F915A488-956C-4B31-89FC-EB5DBC4AC73E}.Release|Any CPU.Build.0 = Release|Any CPU - {245DDDD6-022A-4C2F-8769-FBB6CFDEC585}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {245DDDD6-022A-4C2F-8769-FBB6CFDEC585}.Debug|Any CPU.Build.0 = Debug|Any CPU - {245DDDD6-022A-4C2F-8769-FBB6CFDEC585}.Release|Any CPU.ActiveCfg = Release|Any CPU - {245DDDD6-022A-4C2F-8769-FBB6CFDEC585}.Release|Any CPU.Build.0 = Release|Any CPU {D39E1D83-C3FC-4482-83F5-DDE89B53BEA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D39E1D83-C3FC-4482-83F5-DDE89B53BEA8}.Debug|Any CPU.Build.0 = Debug|Any CPU {D39E1D83-C3FC-4482-83F5-DDE89B53BEA8}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -148,41 +111,81 @@ Global {8E8EB519-70A3-487A-BB71-096988CCA6A9}.Debug|Any CPU.Build.0 = Debug|Any CPU {8E8EB519-70A3-487A-BB71-096988CCA6A9}.Release|Any CPU.ActiveCfg = Release|Any CPU {8E8EB519-70A3-487A-BB71-096988CCA6A9}.Release|Any CPU.Build.0 = Release|Any CPU - {69DF3123-32D8-4583-9D76-A61A78DFF370}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {69DF3123-32D8-4583-9D76-A61A78DFF370}.Debug|Any CPU.Build.0 = Debug|Any CPU - {69DF3123-32D8-4583-9D76-A61A78DFF370}.Release|Any CPU.ActiveCfg = Release|Any CPU - {69DF3123-32D8-4583-9D76-A61A78DFF370}.Release|Any CPU.Build.0 = Release|Any CPU - {CED323B6-506B-470C-9F26-0B77667C8598}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CED323B6-506B-470C-9F26-0B77667C8598}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CED323B6-506B-470C-9F26-0B77667C8598}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CED323B6-506B-470C-9F26-0B77667C8598}.Release|Any CPU.Build.0 = Release|Any CPU + {445E97F5-40B6-4076-835D-11B7BF43F9AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {445E97F5-40B6-4076-835D-11B7BF43F9AD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {445E97F5-40B6-4076-835D-11B7BF43F9AD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {445E97F5-40B6-4076-835D-11B7BF43F9AD}.Release|Any CPU.Build.0 = Release|Any CPU + {7E2FA3C5-C99A-4176-979C-D84F1F14B4DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7E2FA3C5-C99A-4176-979C-D84F1F14B4DE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7E2FA3C5-C99A-4176-979C-D84F1F14B4DE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7E2FA3C5-C99A-4176-979C-D84F1F14B4DE}.Release|Any CPU.Build.0 = Release|Any CPU + {58E26434-18AD-4F16-AA0C-DC39B99751B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {58E26434-18AD-4F16-AA0C-DC39B99751B8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {58E26434-18AD-4F16-AA0C-DC39B99751B8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {58E26434-18AD-4F16-AA0C-DC39B99751B8}.Release|Any CPU.Build.0 = Release|Any CPU + {E111566D-7002-4C26-A0F6-FB3CED429A08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E111566D-7002-4C26-A0F6-FB3CED429A08}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E111566D-7002-4C26-A0F6-FB3CED429A08}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E111566D-7002-4C26-A0F6-FB3CED429A08}.Release|Any CPU.Build.0 = Release|Any CPU + {814798DE-6B17-4318-8392-2E9CDA6EED01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {814798DE-6B17-4318-8392-2E9CDA6EED01}.Debug|Any CPU.Build.0 = Debug|Any CPU + {814798DE-6B17-4318-8392-2E9CDA6EED01}.Release|Any CPU.ActiveCfg = Release|Any CPU + {814798DE-6B17-4318-8392-2E9CDA6EED01}.Release|Any CPU.Build.0 = Release|Any CPU + {064ECC10-79B3-40D8-A4AF-1F978CB46F42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {064ECC10-79B3-40D8-A4AF-1F978CB46F42}.Debug|Any CPU.Build.0 = Debug|Any CPU + {064ECC10-79B3-40D8-A4AF-1F978CB46F42}.Release|Any CPU.ActiveCfg = Release|Any CPU + {064ECC10-79B3-40D8-A4AF-1F978CB46F42}.Release|Any CPU.Build.0 = Release|Any CPU + {5366F6CF-C488-4239-9448-C5D6E524E937}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5366F6CF-C488-4239-9448-C5D6E524E937}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5366F6CF-C488-4239-9448-C5D6E524E937}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5366F6CF-C488-4239-9448-C5D6E524E937}.Release|Any CPU.Build.0 = Release|Any CPU + {ABFF11A9-CF70-4FF1-9636-CE74243C8C0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ABFF11A9-CF70-4FF1-9636-CE74243C8C0B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ABFF11A9-CF70-4FF1-9636-CE74243C8C0B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ABFF11A9-CF70-4FF1-9636-CE74243C8C0B}.Release|Any CPU.Build.0 = Release|Any CPU + {A3A01398-B1A3-44C1-865F-4E9DBDCD381B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A3A01398-B1A3-44C1-865F-4E9DBDCD381B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A3A01398-B1A3-44C1-865F-4E9DBDCD381B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A3A01398-B1A3-44C1-865F-4E9DBDCD381B}.Release|Any CPU.Build.0 = Release|Any CPU + {BDC3FC68-09E4-4C3A-BF70-DB2B2C1BDE86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BDC3FC68-09E4-4C3A-BF70-DB2B2C1BDE86}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BDC3FC68-09E4-4C3A-BF70-DB2B2C1BDE86}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BDC3FC68-09E4-4C3A-BF70-DB2B2C1BDE86}.Release|Any CPU.Build.0 = Release|Any CPU + {20A0DA90-D4AB-45EE-874B-5B2D18D575F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {20A0DA90-D4AB-45EE-874B-5B2D18D575F7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {20A0DA90-D4AB-45EE-874B-5B2D18D575F7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {20A0DA90-D4AB-45EE-874B-5B2D18D575F7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {C556E8A0-8B06-4D5B-AEAD-B318B48DF150} = {A77F1B9E-5576-46F0-BE58-C85FA9FA3A58} {14871D50-7E4E-4BAE-8005-CA86E891F602} = {345DA483-99E7-4FA0-A5D5-5EE62E49E668} - {17E101E1-A0F8-44F0-929C-498E4A41F551} = {35AE6AB6-C68A-4605-9C66-EE652977C27A} - {DE8D288D-8438-42EA-892F-F59840CFE322} = {A77F1B9E-5576-46F0-BE58-C85FA9FA3A58} - {8A6C9438-A389-4563-98EE-1386E0E62AAA} = {14753FBA-8F9B-48A1-9983-7DC37CB32914} - {C6A11273-A560-4BB1-9234-961D30824DAB} = {14753FBA-8F9B-48A1-9983-7DC37CB32914} - {7F3A2CE5-ADEE-426F-BE99-D899D87EFF2F} = {6421F571-315C-47BB-A9F9-4542759E968E} + {14753FBA-8F9B-48A1-9983-7DC37CB32914} = {3A8B1862-E4CB-4F06-9790-14FE91D8D93E} + {A77F1B9E-5576-46F0-BE58-C85FA9FA3A58} = {3A8B1862-E4CB-4F06-9790-14FE91D8D93E} + {6421F571-315C-47BB-A9F9-4542759E968E} = {3A8B1862-E4CB-4F06-9790-14FE91D8D93E} {969D44CC-1EE3-4176-B139-9B6860D88602} = {6421F571-315C-47BB-A9F9-4542759E968E} - {47D7A5D9-554E-47B8-B666-20E7D3DFE30F} = {14753FBA-8F9B-48A1-9983-7DC37CB32914} {64C1B6AC-F7D8-43FD-BA1F-584EF5B5934A} = {345DA483-99E7-4FA0-A5D5-5EE62E49E668} {0580E90D-271D-46B0-8274-EB29D521F399} = {345DA483-99E7-4FA0-A5D5-5EE62E49E668} {2C02FC8F-FF75-4963-8545-EE58C105025D} = {345DA483-99E7-4FA0-A5D5-5EE62E49E668} - {F915A488-956C-4B31-89FC-EB5DBC4AC73E} = {A77F1B9E-5576-46F0-BE58-C85FA9FA3A58} - {245DDDD6-022A-4C2F-8769-FBB6CFDEC585} = {A77F1B9E-5576-46F0-BE58-C85FA9FA3A58} {D39E1D83-C3FC-4482-83F5-DDE89B53BEA8} = {345DA483-99E7-4FA0-A5D5-5EE62E49E668} {FC459C7B-5111-4FF7-A93A-5A02B48AA3B7} = {68128D24-3F72-4A25-A876-509F12F38E73} {5A3184EF-56BC-4AEA-95C4-8595FC5B1992} = {68128D24-3F72-4A25-A876-509F12F38E73} {A40B1EE0-7407-47CB-B0FB-EE65A955A559} = {68128D24-3F72-4A25-A876-509F12F38E73} {363CC373-CF04-4204-A44A-C96AB1B1085E} = {68128D24-3F72-4A25-A876-509F12F38E73} {8E8EB519-70A3-487A-BB71-096988CCA6A9} = {68128D24-3F72-4A25-A876-509F12F38E73} - {69DF3123-32D8-4583-9D76-A61A78DFF370} = {35AE6AB6-C68A-4605-9C66-EE652977C27A} - {CED323B6-506B-470C-9F26-0B77667C8598} = {A77F1B9E-5576-46F0-BE58-C85FA9FA3A58} + {35AE6AB6-C68A-4605-9C66-EE652977C27A} = {3A8B1862-E4CB-4F06-9790-14FE91D8D93E} + {445E97F5-40B6-4076-835D-11B7BF43F9AD} = {35AE6AB6-C68A-4605-9C66-EE652977C27A} + {7E2FA3C5-C99A-4176-979C-D84F1F14B4DE} = {35AE6AB6-C68A-4605-9C66-EE652977C27A} + {58E26434-18AD-4F16-AA0C-DC39B99751B8} = {6421F571-315C-47BB-A9F9-4542759E968E} + {E111566D-7002-4C26-A0F6-FB3CED429A08} = {14753FBA-8F9B-48A1-9983-7DC37CB32914} + {814798DE-6B17-4318-8392-2E9CDA6EED01} = {14753FBA-8F9B-48A1-9983-7DC37CB32914} + {064ECC10-79B3-40D8-A4AF-1F978CB46F42} = {14753FBA-8F9B-48A1-9983-7DC37CB32914} + {5366F6CF-C488-4239-9448-C5D6E524E937} = {A77F1B9E-5576-46F0-BE58-C85FA9FA3A58} + {ABFF11A9-CF70-4FF1-9636-CE74243C8C0B} = {A77F1B9E-5576-46F0-BE58-C85FA9FA3A58} + {A3A01398-B1A3-44C1-865F-4E9DBDCD381B} = {A77F1B9E-5576-46F0-BE58-C85FA9FA3A58} + {BDC3FC68-09E4-4C3A-BF70-DB2B2C1BDE86} = {A77F1B9E-5576-46F0-BE58-C85FA9FA3A58} + {20A0DA90-D4AB-45EE-874B-5B2D18D575F7} = {A77F1B9E-5576-46F0-BE58-C85FA9FA3A58} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {0A7C16DC-1BAA-44BC-AA1C-D40B7B61878E} diff --git a/tests/net/KNetTestKNetStreams/KNetTestKNetStreams.csproj b/tests/net/Streams/KNetTestKNetStreams/KNetTestKNetStreams.csproj similarity index 75% rename from tests/net/KNetTestKNetStreams/KNetTestKNetStreams.csproj rename to tests/net/Streams/KNetTestKNetStreams/KNetTestKNetStreams.csproj index 8cbdf3cd6e..7c68ef42e2 100644 --- a/tests/net/KNetTestKNetStreams/KNetTestKNetStreams.csproj +++ b/tests/net/Streams/KNetTestKNetStreams/KNetTestKNetStreams.csproj @@ -1,5 +1,5 @@ - + KNetTestKNetStreams Exe @@ -8,6 +8,6 @@ KNetTestKNetStreams - a test tool for KNet Streams SDK - + diff --git a/tests/net/KNetTestKNetStreams/Program.cs b/tests/net/Streams/KNetTestKNetStreams/Program.cs similarity index 100% rename from tests/net/KNetTestKNetStreams/Program.cs rename to tests/net/Streams/KNetTestKNetStreams/Program.cs diff --git a/tests/net/KNetTestStreams/KNetTestStreams.csproj b/tests/net/Streams/KNetTestStreams/KNetTestStreams.csproj similarity index 74% rename from tests/net/KNetTestStreams/KNetTestStreams.csproj rename to tests/net/Streams/KNetTestStreams/KNetTestStreams.csproj index bc519e8e14..e2e87dff9d 100644 --- a/tests/net/KNetTestStreams/KNetTestStreams.csproj +++ b/tests/net/Streams/KNetTestStreams/KNetTestStreams.csproj @@ -1,5 +1,5 @@ - + KNetTestStreams Exe @@ -8,6 +8,6 @@ KNetTestStreams - a test tool for KNet Streams - + diff --git a/tests/net/KNetTestStreams/Program.cs b/tests/net/Streams/KNetTestStreams/Program.cs similarity index 100% rename from tests/net/KNetTestStreams/Program.cs rename to tests/net/Streams/KNetTestStreams/Program.cs From 4a4a7ffa28fdc1180b727fbded5f34b1ae6c7bbd Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Tue, 25 Jun 2024 19:31:15 +0200 Subject: [PATCH 15/52] Added check --- tests/net/General/KNetTestSerDes/Program.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/net/General/KNetTestSerDes/Program.cs b/tests/net/General/KNetTestSerDes/Program.cs index 0175712d30..aaf93896dd 100644 --- a/tests/net/General/KNetTestSerDes/Program.cs +++ b/tests/net/General/KNetTestSerDes/Program.cs @@ -30,7 +30,11 @@ static void Main(string[] args) try { SharedKNetCore.Create(); - +#if NET462_OR_GREATER + // check why and if this is needed in Windows + var str = new Java.Lang.String("test string"); + Console.WriteLine(str); +#endif byte[] bb, bb1; bb = KNetSerialization.SerializeBoolean(false, "test", false); From c72ac03baa85fe21502ba08fee332f2f409c9f86 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Tue, 25 Jun 2024 21:56:41 +0200 Subject: [PATCH 16/52] Force Globalize --- tests/net/Common/SharedKNetCore.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/net/Common/SharedKNetCore.cs b/tests/net/Common/SharedKNetCore.cs index 60947ef90f..53d90cbcc9 100644 --- a/tests/net/Common/SharedKNetCore.cs +++ b/tests/net/Common/SharedKNetCore.cs @@ -33,7 +33,17 @@ public static void Create() throw new InvalidOperationException("Failed to create GlobalInstance"); } } +#if NET462_OR_GREATER + public override bool Globalize + { + get + { + Console.WriteLine($"Globalize was {base.Globalize}, set to true"); + return true; + } + } +#endif public static int ManageException(System.Exception e) { int retCode = 0; From 34195a5c13b500f5f6a1e950071e1618ef5847b2 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Tue, 25 Jun 2024 22:13:36 +0200 Subject: [PATCH 17/52] Use current version of KNetCLI --- .github/workflows/build.yaml | 25 ++++++++++++++++++------- tests/net/Common/SharedKNetCore.cs | 1 - 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a04cf0a2ad..15993f9971 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -201,6 +201,13 @@ jobs: enableCrossOsArchive: true path: ./bin/ key: KNet_bin_${{ github.sha }} + + - name: Save KNetCLI bin in cache + uses: actions/cache/save@v4 + with: + enableCrossOsArchive: true + path: ./binCLI/ + key: KNetCLI_bin_${{ github.sha }} build_container_knettest: needs: check_changes @@ -391,17 +398,21 @@ jobs: env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - name: Authenticate to GitHub - run: dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/masesgroup/index.json" - - - name: Download latest published version of KNetCLI - run: dotnet tool update -g MASES.KNetCLI + - name: Start Kafka on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} + if: ${{ matrix.os != 'windows-latest' }} + shell: pwsh + run: | + Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/bin/${{ matrix.framework }}/KNetCLI.dll', 'zookeeperstart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/zookeeper.properties' ) + Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/bin/${{ matrix.framework }}/KNetCLI.dll', 'kafkastart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/server.properties' ) + env: + JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - name: Start Kafka on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} + if: ${{ matrix.os == 'windows-latest' }} shell: pwsh run: | - Start-Process -FilePath knet -ArgumentList ( 'zookeeperstart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/zookeeper.properties' ) - Start-Process -FilePath knet -ArgumentList ( 'kafkastart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/server.properties' ) + Start-Process -FilePath ${{ github.workspace }}\bin\${{ matrix.framework }}\KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/zookeeper.properties' ) + Start-Process -FilePath ${{ github.workspace }}\bin\${{ matrix.framework }}\KNetCLI.exe -ArgumentList ( 'kafkastart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/server.properties' ) env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} diff --git a/tests/net/Common/SharedKNetCore.cs b/tests/net/Common/SharedKNetCore.cs index 53d90cbcc9..f7c6fce095 100644 --- a/tests/net/Common/SharedKNetCore.cs +++ b/tests/net/Common/SharedKNetCore.cs @@ -17,7 +17,6 @@ */ using Java.Lang; -using Javax.Security.Auth.Login; using System; namespace MASES.KNet.TestCommon From 633c7012556e116fc5ab7bafe10b37c4912be794 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Tue, 25 Jun 2024 22:29:36 +0200 Subject: [PATCH 18/52] Verify global instance --- tests/net/Common/SharedKNetCore.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/net/Common/SharedKNetCore.cs b/tests/net/Common/SharedKNetCore.cs index f7c6fce095..9a292082e7 100644 --- a/tests/net/Common/SharedKNetCore.cs +++ b/tests/net/Common/SharedKNetCore.cs @@ -31,13 +31,16 @@ public static void Create() { throw new InvalidOperationException("Failed to create GlobalInstance"); } + if (JCOBridge.C2JBridge.JCOBridge.Global == null) + { + throw new InvalidOperationException("JCOBridge.C2JBridge.JCOBridge.Global is null!!!"); + } } #if NET462_OR_GREATER public override bool Globalize { get { - Console.WriteLine($"Globalize was {base.Globalize}, set to true"); return true; } From 4e29e79d106b2258f2eb7f1eda1519292da5f759 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Tue, 25 Jun 2024 23:30:52 +0200 Subject: [PATCH 19/52] Change execution order --- .github/workflows/build.yaml | 52 +++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 15993f9971..19f6984d25 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -202,7 +202,7 @@ jobs: path: ./bin/ key: KNet_bin_${{ github.sha }} - - name: Save KNetCLI bin in cache + - name: Save KNetCLI binCLI in cache uses: actions/cache/save@v4 with: enableCrossOsArchive: true @@ -319,18 +319,18 @@ jobs: distribution: ${{ matrix.jdk_vendor }} java-version: ${{ matrix.jdk_version }} + - name: Executing KNetTest on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} + if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' || matrix.os == 'macos-13' }} + run: dotnet ./bin/${{ matrix.framework }}/KNetTest.dll localhost:9092 useConsumeCallback randomizeTopicName ${{ matrix.buffered }} ${{ matrix.extraValue }} + env: + JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} + - name: Executing KNetTestSerDes on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} shell: pwsh run: dotnet ${{ github.workspace }}/bin/${{ matrix.framework }}/KNetTestSerDes.dll env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - name: Executing KNetTest on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} - if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' || matrix.os == 'macos-13' }} - run: dotnet ./bin/${{ matrix.framework }}/KNetTest.dll localhost:9092 useConsumeCallback randomizeTopicName ${{ matrix.buffered }} ${{ matrix.extraValue }} - env: - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - # Following shall be disabled since not supported from GitHub # #- name: Executing KNetTest on Windows with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} @@ -377,27 +377,21 @@ jobs: enableCrossOsArchive: true path: ./bin/ key: KNet_bin_${{ github.sha }} - + + - name: Restore KNetCLI binCLI from cache + uses: actions/cache/restore@v4 + with: + fail-on-cache-miss: true + enableCrossOsArchive: true + path: ./binCLI/ + key: KNetCLI_bin_${{ github.sha }} + - name: Set up JDK distribution uses: actions/setup-java@v4 with: # running setup-java again overwrites the settings.xml distribution: ${{ matrix.jdk_vendor }} java-version: ${{ matrix.jdk_version }} - - name: Executing KNetTestSerDes on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} - if: ${{ matrix.os != 'windows-latest' }} - shell: pwsh - run: dotnet ${{ github.workspace }}/bin/${{ matrix.framework }}/KNetTestSerDes.dll - env: - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - - name: Executing KNetTestSerDes on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} - if: ${{ matrix.os == 'windows-latest' }} - shell: pwsh - run: ${{ github.workspace }}\bin\${{ matrix.framework }}\KNetTestSerDes.exe - env: - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - name: Start Kafka on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} if: ${{ matrix.os != 'windows-latest' }} shell: pwsh @@ -429,3 +423,17 @@ jobs: run: ${{ github.workspace }}/bin/${{ matrix.framework }}/KNetTest.exe localhost:9092 useConsumeCallback randomizeTopicName ${{ matrix.buffered }} ${{ matrix.extraValue }} env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} + + - name: Executing KNetTestSerDes on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} + if: ${{ matrix.os != 'windows-latest' }} + shell: pwsh + run: dotnet ${{ github.workspace }}/bin/${{ matrix.framework }}/KNetTestSerDes.dll + env: + JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} + + - name: Executing KNetTestSerDes on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} + if: ${{ matrix.os == 'windows-latest' }} + shell: pwsh + run: ${{ github.workspace }}\bin\${{ matrix.framework }}\KNetTestSerDes.exe + env: + JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} From 5dabe158253afc3d09a90da9b3201c47c0c85ad1 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Tue, 25 Jun 2024 23:42:22 +0200 Subject: [PATCH 20/52] Path fix --- .github/workflows/build.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 19f6984d25..d56be9d809 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -396,8 +396,8 @@ jobs: if: ${{ matrix.os != 'windows-latest' }} shell: pwsh run: | - Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/bin/${{ matrix.framework }}/KNetCLI.dll', 'zookeeperstart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/zookeeper.properties' ) - Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/bin/${{ matrix.framework }}/KNetCLI.dll', 'kafkastart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/server.properties' ) + Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/KNetCLI.dll', 'zookeeperstart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/zookeeper.properties' ) + Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/KNetCLI.dll', 'kafkastart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/server.properties' ) env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} @@ -405,8 +405,8 @@ jobs: if: ${{ matrix.os == 'windows-latest' }} shell: pwsh run: | - Start-Process -FilePath ${{ github.workspace }}\bin\${{ matrix.framework }}\KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/zookeeper.properties' ) - Start-Process -FilePath ${{ github.workspace }}\bin\${{ matrix.framework }}\KNetCLI.exe -ArgumentList ( 'kafkastart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/server.properties' ) + Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/zookeeper.properties' ) + Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\KNetCLI.exe -ArgumentList ( 'kafkastart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/server.properties' ) env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} From df2ea361eb3abdade97720fee1aa9eff5fe2049c Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 00:00:31 +0200 Subject: [PATCH 21/52] Name fix --- .github/workflows/build.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d56be9d809..46892ceb8b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -396,8 +396,8 @@ jobs: if: ${{ matrix.os != 'windows-latest' }} shell: pwsh run: | - Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/KNetCLI.dll', 'zookeeperstart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/zookeeper.properties' ) - Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/KNetCLI.dll', 'kafkastart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/server.properties' ) + Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'zookeeperstart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/zookeeper.properties' ) + Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'kafkastart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/server.properties' ) env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} @@ -405,8 +405,8 @@ jobs: if: ${{ matrix.os == 'windows-latest' }} shell: pwsh run: | - Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/zookeeper.properties' ) - Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\KNetCLI.exe -ArgumentList ( 'kafkastart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/server.properties' ) + Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/zookeeper.properties' ) + Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/server.properties' ) env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} From a32054ffa5d1d6acc02d88a1a5730c6e17d1fcb1 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 02:04:30 +0200 Subject: [PATCH 22/52] Added final cleanup --- .github/workflows/build.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 46892ceb8b..1f08e5224c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -437,3 +437,21 @@ jobs: run: ${{ github.workspace }}\bin\${{ matrix.framework }}\KNetTestSerDes.exe env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} + + final_cleanup: + needs: [ execute_KNetTest_linux, execute_KNetTest_other ] + if: "always()" + runs-on: ubuntu-latest + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - name: Install GH extension + run: gh extension install actions/gh-actions-cache + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Clear caches + run: | + gh actions-cache delete KNet_bin_${{ github.sha }} + gh actions-cache delete KNetCLI_bin_${{ github.sha }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 030aefec81b2612428af261e1d26d915f478d75b Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 02:51:09 +0200 Subject: [PATCH 23/52] Added checkout --- .github/workflows/build.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1f08e5224c..c4b7cc378a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -444,6 +444,11 @@ jobs: runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v4 + with: + fetch-depth: '1' + - name: Install GH extension run: gh extension install actions/gh-actions-cache env: From 9546d35c166376cb751c37575fea9ccdc98f3782 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 03:17:32 +0200 Subject: [PATCH 24/52] Added confirm --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c4b7cc378a..de4e521238 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -456,7 +456,7 @@ jobs: - name: Clear caches run: | - gh actions-cache delete KNet_bin_${{ github.sha }} - gh actions-cache delete KNetCLI_bin_${{ github.sha }} + gh actions-cache delete KNet_bin_${{ github.sha }} --confirm + gh actions-cache delete KNetCLI_bin_${{ github.sha }} --confirm env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 54517b0c30689a9ab4adc3d976593f9f8ed9220e Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 03:38:03 +0200 Subject: [PATCH 25/52] Split cache by framework --- .github/workflows/build.yaml | 66 ++++++++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index de4e521238..e9ab6550ba 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -195,19 +195,47 @@ jobs: Copy-Item src\container\config_container\server.properties -Destination bin\server.properties -Force Copy-Item src\container\config_container\log4j.properties -Destination bin\log4j.properties -Force - - name: Save KNet bin in cache + - name: Save KNet net462 bin in cache uses: actions/cache/save@v4 with: enableCrossOsArchive: true - path: ./bin/ - key: KNet_bin_${{ github.sha }} + path: ./bin/net462/ + key: KNet_net462_bin_${{ github.sha }} - - name: Save KNetCLI binCLI in cache + - name: Save KNet net6.0 bin in cache uses: actions/cache/save@v4 with: enableCrossOsArchive: true - path: ./binCLI/ - key: KNetCLI_bin_${{ github.sha }} + path: ./bin/net6.0/ + key: KNet_net6.0_bin_${{ github.sha }} + + - name: Save KNet net8.0 bin in cache + uses: actions/cache/save@v4 + with: + enableCrossOsArchive: true + path: ./bin/net8.0/ + key: KNet_net8.0_bin_${{ github.sha }} + + - name: Save KNet net462 binCLI in cache + uses: actions/cache/save@v4 + with: + enableCrossOsArchive: true + path: ./binCLI/net462/ + key: KNet_net462_binCLI_${{ github.sha }} + + - name: Save KNet net6.0 binCLI in cache + uses: actions/cache/save@v4 + with: + enableCrossOsArchive: true + path: ./binCLI/net6.0/ + key: KNet_net6.0_binCLI_${{ github.sha }} + + - name: Save KNet net8.0 binCLI in cache + uses: actions/cache/save@v4 + with: + enableCrossOsArchive: true + path: ./binCLI/net8.0/ + key: KNet_net8.0_binCLI_${{ github.sha }} build_container_knettest: needs: check_changes @@ -305,13 +333,13 @@ jobs: runs-on: ${{ matrix.os }} steps: - - name: Restore KNet bin from cache + - name: Restore KNet ${{ matrix.framework }} bin from cache uses: actions/cache/restore@v4 with: fail-on-cache-miss: true enableCrossOsArchive: true - path: ./bin/ - key: KNet_bin_${{ github.sha }} + path: ./bin/${{ matrix.framework }}/ + key: KNet_${{ matrix.framework }}_bin_${{ github.sha }} - name: Set up JDK distribution uses: actions/setup-java@v4 @@ -370,21 +398,21 @@ jobs: runs-on: ${{ matrix.os }} steps: - - name: Restore KNet bin from cache + - name: Restore KNet ${{ matrix.framework }} bin from cache uses: actions/cache/restore@v4 with: fail-on-cache-miss: true enableCrossOsArchive: true - path: ./bin/ - key: KNet_bin_${{ github.sha }} + path: ./bin/${{ matrix.framework }}/ + key: KNet_${{ matrix.framework }}_bin_${{ github.sha }} - - name: Restore KNetCLI binCLI from cache + - name: Restore KNetCLI ${{ matrix.framework }} binCLI from cache uses: actions/cache/restore@v4 with: fail-on-cache-miss: true enableCrossOsArchive: true - path: ./binCLI/ - key: KNetCLI_bin_${{ github.sha }} + path: ./binCLI/${{ matrix.framework }}/ + key: KNetCLI_${{ matrix.framework }}_binCLI_${{ github.sha }} - name: Set up JDK distribution uses: actions/setup-java@v4 @@ -456,7 +484,11 @@ jobs: - name: Clear caches run: | - gh actions-cache delete KNet_bin_${{ github.sha }} --confirm - gh actions-cache delete KNetCLI_bin_${{ github.sha }} --confirm + gh actions-cache delete KNet_net462_bin_${{ github.sha }} --confirm + gh actions-cache delete KNet_net6.0_bin_${{ github.sha }} --confirm + gh actions-cache delete KNet_net8.0_bin_${{ github.sha }} --confirm + gh actions-cache delete KNetCLI_net462_binCLI_${{ github.sha }} --confirm + gh actions-cache delete KNetCLI_net6.0_binCLI_${{ github.sha }} --confirm + gh actions-cache delete KNetCLI_net8.0_binCLI_${{ github.sha }} --confirm env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 007a94cc8bed3fc8df62b5f323cce0463bd16c7a Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 04:03:45 +0200 Subject: [PATCH 26/52] Name fix --- .github/workflows/build.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e9ab6550ba..ca59ccdea4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -412,7 +412,7 @@ jobs: fail-on-cache-miss: true enableCrossOsArchive: true path: ./binCLI/${{ matrix.framework }}/ - key: KNetCLI_${{ matrix.framework }}_binCLI_${{ github.sha }} + key: KNet_${{ matrix.framework }}_binCLI_${{ github.sha }} - name: Set up JDK distribution uses: actions/setup-java@v4 @@ -487,8 +487,8 @@ jobs: gh actions-cache delete KNet_net462_bin_${{ github.sha }} --confirm gh actions-cache delete KNet_net6.0_bin_${{ github.sha }} --confirm gh actions-cache delete KNet_net8.0_bin_${{ github.sha }} --confirm - gh actions-cache delete KNetCLI_net462_binCLI_${{ github.sha }} --confirm - gh actions-cache delete KNetCLI_net6.0_binCLI_${{ github.sha }} --confirm - gh actions-cache delete KNetCLI_net8.0_binCLI_${{ github.sha }} --confirm + gh actions-cache delete KNet_net462_binCLI_${{ github.sha }} --confirm + gh actions-cache delete KNet_net6.0_binCLI_${{ github.sha }} --confirm + gh actions-cache delete KNet_net8.0_binCLI_${{ github.sha }} --confirm env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From ec64efc09d54ed151a4660988e2e3a5deec250f1 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 04:39:52 +0200 Subject: [PATCH 27/52] Conf --- .github/workflows/build.yaml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ca59ccdea4..afb08c92b0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -191,9 +191,15 @@ jobs: - name: Prepare configuration files run: | - Copy-Item src\container\config_container\zookeeper.properties -Destination bin\zookeeper.properties -Force - Copy-Item src\container\config_container\server.properties -Destination bin\server.properties -Force - Copy-Item src\container\config_container\log4j.properties -Destination bin\log4j.properties -Force + Copy-Item src\container\config_container\zookeeper.properties -Destination bin\net462\zookeeper.properties -Force + Copy-Item src\container\config_container\server.properties -Destination bin\net462\server.properties -Force + Copy-Item src\container\config_container\log4j.properties -Destination bin\net462\log4j.properties -Force + Copy-Item src\container\config_container\zookeeper.properties -Destination bin\net6.0\zookeeper.properties -Force + Copy-Item src\container\config_container\server.properties -Destination bin\net6.0\server.properties -Force + Copy-Item src\container\config_container\log4j.properties -Destination bin\net6.0\log4j.properties -Force + Copy-Item src\container\config_container\zookeeper.properties -Destination bin\net8.0\zookeeper.properties -Force + Copy-Item src\container\config_container\server.properties -Destination bin\net8.0\server.properties -Force + Copy-Item src\container\config_container\log4j.properties -Destination bin\net8.0\log4j.properties -Force - name: Save KNet net462 bin in cache uses: actions/cache/save@v4 @@ -424,8 +430,8 @@ jobs: if: ${{ matrix.os != 'windows-latest' }} shell: pwsh run: | - Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'zookeeperstart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/zookeeper.properties' ) - Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'kafkastart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/server.properties' ) + Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'zookeeperstart', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/zookeeper.properties' ) + Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'kafkastart', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/server.properties' ) env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} @@ -433,8 +439,8 @@ jobs: if: ${{ matrix.os == 'windows-latest' }} shell: pwsh run: | - Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/zookeeper.properties' ) - Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-Log4JConfiguration', '${{ github.workspace }}/bin/log4j.properties', '${{ github.workspace }}/bin/server.properties' ) + Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/zookeeper.properties' ) + Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/server.properties' ) env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} From a3839f7707bcf62b8f6614124ad2f5f0e4122c89 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 05:04:34 +0200 Subject: [PATCH 28/52] Avoid error --- .github/workflows/build.yaml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index afb08c92b0..8ebec532ec 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -482,19 +482,19 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: '1' - - - name: Install GH extension - run: gh extension install actions/gh-actions-cache - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - + - name: Clear caches run: | - gh actions-cache delete KNet_net462_bin_${{ github.sha }} --confirm - gh actions-cache delete KNet_net6.0_bin_${{ github.sha }} --confirm - gh actions-cache delete KNet_net8.0_bin_${{ github.sha }} --confirm - gh actions-cache delete KNet_net462_binCLI_${{ github.sha }} --confirm - gh actions-cache delete KNet_net6.0_binCLI_${{ github.sha }} --confirm - gh actions-cache delete KNet_net8.0_binCLI_${{ github.sha }} --confirm + gh extension install actions/gh-actions-cache + echo "Fetching list of cache key" + cacheKeysForPR=$(gh actions-cache list --key KNet ) + ## Setting this to not fail the workflow while deleting cache keys. + set +e + echo "Deleting caches..." + for cacheKey in $cacheKeysForPR + do + gh actions-cache delete $cacheKey --confirm + done + echo "Done" env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 1be38e911a346fab59bcd8754de0df9b21ba2f4a Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 14:08:25 +0200 Subject: [PATCH 29/52] Added logs --- .github/workflows/build.yaml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8ebec532ec..e03d94bc4c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -193,13 +193,13 @@ jobs: run: | Copy-Item src\container\config_container\zookeeper.properties -Destination bin\net462\zookeeper.properties -Force Copy-Item src\container\config_container\server.properties -Destination bin\net462\server.properties -Force - Copy-Item src\container\config_container\log4j.properties -Destination bin\net462\log4j.properties -Force + Copy-Item src\config\log4j.properties -Destination bin\net462\log4j.properties -Force Copy-Item src\container\config_container\zookeeper.properties -Destination bin\net6.0\zookeeper.properties -Force Copy-Item src\container\config_container\server.properties -Destination bin\net6.0\server.properties -Force - Copy-Item src\container\config_container\log4j.properties -Destination bin\net6.0\log4j.properties -Force + Copy-Item src\config\log4j.properties -Destination bin\net6.0\log4j.properties -Force Copy-Item src\container\config_container\zookeeper.properties -Destination bin\net8.0\zookeeper.properties -Force Copy-Item src\container\config_container\server.properties -Destination bin\net8.0\server.properties -Force - Copy-Item src\container\config_container\log4j.properties -Destination bin\net8.0\log4j.properties -Force + Copy-Item src\config\log4j.properties -Destination bin\net8.0\log4j.properties -Force - name: Save KNet net462 bin in cache uses: actions/cache/save@v4 @@ -430,8 +430,9 @@ jobs: if: ${{ matrix.os != 'windows-latest' }} shell: pwsh run: | - Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'zookeeperstart', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/zookeeper.properties' ) - Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'kafkastart', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/server.properties' ) + New-Item -Path "${{ github.workspace }}/binCLI/" -Name "logfiles" + Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'zookeeperstart', '-LogPath', '${{ github.workspace }}/binCLI/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/zookeeper.properties', '-RSE', '${{ github.workspace }}/binCLI/logfiles/zookeeper_err.log', '-RSO', '${{ github.workspace }}/binCLI/logfiles/zookeeper_out.log' ) + Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'kafkastart', '-LogPath', '${{ github.workspace }}/binCLI/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/server.properties', '-RSE', '${{ github.workspace }}/binCLI/logfiles/kafka_err.log', '-RSO', '${{ github.workspace }}/binCLI/logfiles/kafka_out.log' ) env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} @@ -439,8 +440,9 @@ jobs: if: ${{ matrix.os == 'windows-latest' }} shell: pwsh run: | - Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/zookeeper.properties' ) - Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/server.properties' ) + New-Item -Path "${{ github.workspace }}/binCLI/" -Name "logfiles" + Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-LogPath', '${{ github.workspace }}/binCLI/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/zookeeper.properties', '-RSE', '${{ github.workspace }}/binCLI/logfiles/zookeeper_err.log', '-RSO', '${{ github.workspace }}/binCLI/logfiles/zookeeper_out.log' ) + Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-LogPath', '${{ github.workspace }}/binCLI/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/server.properties', '-RSE', '${{ github.workspace }}/binCLI/logfiles/kafka_err.log', '-RSO', '${{ github.workspace }}/binCLI/logfiles/kafka_out.log' ) env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} @@ -472,6 +474,11 @@ jobs: env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} + - uses: actions/upload-artifact@v4 + with: + name: KNet_Server_${{ matrix.framework }}_${{ matrix.os }}_${{ matrix.jdk_vendor }}_${{ matrix.jdk_version }} + path: ${{ github.workspace }}/binCLI/logfiles/ + final_cleanup: needs: [ execute_KNetTest_linux, execute_KNetTest_other ] if: "always()" From 16d7184a52cebfdd18fbbc2f312d1117a3bf2bcd Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 14:36:44 +0200 Subject: [PATCH 30/52] Always upload --- .github/workflows/build.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e03d94bc4c..f00ea614c7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -475,9 +475,11 @@ jobs: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - uses: actions/upload-artifact@v4 + if: "always()" with: name: KNet_Server_${{ matrix.framework }}_${{ matrix.os }}_${{ matrix.jdk_vendor }}_${{ matrix.jdk_version }} path: ${{ github.workspace }}/binCLI/logfiles/ + retention-days: 7 final_cleanup: needs: [ execute_KNetTest_linux, execute_KNetTest_other ] From 1fd6fd8acae692d7e0aae9fb30915bd4e05ded69 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 14:53:09 +0200 Subject: [PATCH 31/52] File rename --- .github/workflows/build.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f00ea614c7..0e0827b2ec 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -431,8 +431,8 @@ jobs: shell: pwsh run: | New-Item -Path "${{ github.workspace }}/binCLI/" -Name "logfiles" - Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'zookeeperstart', '-LogPath', '${{ github.workspace }}/binCLI/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/zookeeper.properties', '-RSE', '${{ github.workspace }}/binCLI/logfiles/zookeeper_err.log', '-RSO', '${{ github.workspace }}/binCLI/logfiles/zookeeper_out.log' ) - Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'kafkastart', '-LogPath', '${{ github.workspace }}/binCLI/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/server.properties', '-RSE', '${{ github.workspace }}/binCLI/logfiles/kafka_err.log', '-RSO', '${{ github.workspace }}/binCLI/logfiles/kafka_out.log' ) + Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'zookeeperstart', '-LogPath', '${{ github.workspace }}/binCLI/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/zookeeper.properties', '-RSE', '${{ github.workspace }}/binCLI/logfiles/PWSH_zookeeper_err.log', '-RSO', '${{ github.workspace }}/binCLI/logfiles/PWSH_zookeeper_out.log' ) + Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'kafkastart', '-LogPath', '${{ github.workspace }}/binCLI/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/server.properties', '-RSE', '${{ github.workspace }}/binCLI/logfiles/PWSH_kafka_err.log', '-RSO', '${{ github.workspace }}/binCLI/logfiles/PWSH_kafka_out.log' ) env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} @@ -441,8 +441,8 @@ jobs: shell: pwsh run: | New-Item -Path "${{ github.workspace }}/binCLI/" -Name "logfiles" - Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-LogPath', '${{ github.workspace }}/binCLI/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/zookeeper.properties', '-RSE', '${{ github.workspace }}/binCLI/logfiles/zookeeper_err.log', '-RSO', '${{ github.workspace }}/binCLI/logfiles/zookeeper_out.log' ) - Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-LogPath', '${{ github.workspace }}/binCLI/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/server.properties', '-RSE', '${{ github.workspace }}/binCLI/logfiles/kafka_err.log', '-RSO', '${{ github.workspace }}/binCLI/logfiles/kafka_out.log' ) + Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-LogPath', '${{ github.workspace }}/binCLI/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/zookeeper.properties', '-RSE', '${{ github.workspace }}/binCLI/logfiles/PWSH_zookeeper_err.log', '-RSO', '${{ github.workspace }}/binCLI/logfiles/PWSH_zookeeper_out.log' ) + Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-LogPath', '${{ github.workspace }}/binCLI/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/server.properties', '-RSE', '${{ github.workspace }}/binCLI/logfiles/PWSH_kafka_err.log', '-RSO', '${{ github.workspace }}/binCLI/logfiles/PWSH_kafka_out.log' ) env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} From a24a4aa66064aec93264c33664c717ceedaff630 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 15:06:33 +0200 Subject: [PATCH 32/52] Fix path --- .github/workflows/build.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0e0827b2ec..c933779c3b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -430,9 +430,9 @@ jobs: if: ${{ matrix.os != 'windows-latest' }} shell: pwsh run: | - New-Item -Path "${{ github.workspace }}/binCLI/" -Name "logfiles" - Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'zookeeperstart', '-LogPath', '${{ github.workspace }}/binCLI/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/zookeeper.properties', '-RSE', '${{ github.workspace }}/binCLI/logfiles/PWSH_zookeeper_err.log', '-RSO', '${{ github.workspace }}/binCLI/logfiles/PWSH_zookeeper_out.log' ) - Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'kafkastart', '-LogPath', '${{ github.workspace }}/binCLI/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/server.properties', '-RSE', '${{ github.workspace }}/binCLI/logfiles/PWSH_kafka_err.log', '-RSO', '${{ github.workspace }}/binCLI/logfiles/PWSH_kafka_out.log' ) + New-Item -Path "${{ github.workspace }}" -Name "logfiles" -ItemType "directory" + Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'zookeeperstart', '-LogPath', '${{ github.workspace }}/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/zookeeper.properties', '-RSE', '${{ github.workspace }}/logfiles/PWSH_zookeeper_err.log', '-RSO', '${{ github.workspace }}/logfiles/PWSH_zookeeper_out.log' ) + Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'kafkastart', '-LogPath', '${{ github.workspace }}/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/server.properties', '-RSE', '${{ github.workspace }}/logfiles/PWSH_kafka_err.log', '-RSO', '${{ github.workspace }}/logfiles/PWSH_kafka_out.log' ) env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} @@ -440,9 +440,9 @@ jobs: if: ${{ matrix.os == 'windows-latest' }} shell: pwsh run: | - New-Item -Path "${{ github.workspace }}/binCLI/" -Name "logfiles" - Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-LogPath', '${{ github.workspace }}/binCLI/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/zookeeper.properties', '-RSE', '${{ github.workspace }}/binCLI/logfiles/PWSH_zookeeper_err.log', '-RSO', '${{ github.workspace }}/binCLI/logfiles/PWSH_zookeeper_out.log' ) - Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-LogPath', '${{ github.workspace }}/binCLI/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/server.properties', '-RSE', '${{ github.workspace }}/binCLI/logfiles/PWSH_kafka_err.log', '-RSO', '${{ github.workspace }}/binCLI/logfiles/PWSH_kafka_out.log' ) + New-Item -Path "${{ github.workspace }}" -Name "logfiles" -ItemType "directory" + Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-LogPath', '${{ github.workspace }}/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/zookeeper.properties', '-RSE', '${{ github.workspace }}/logfiles/PWSH_zookeeper_err.log', '-RSO', '${{ github.workspace }}/logfiles/PWSH_zookeeper_out.log' ) + Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-LogPath', '${{ github.workspace }}/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/server.properties', '-RSE', '${{ github.workspace }}/logfiles/PWSH_kafka_err.log', '-RSO', '${{ github.workspace }}/logfiles/PWSH_kafka_out.log' ) env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} @@ -478,7 +478,7 @@ jobs: if: "always()" with: name: KNet_Server_${{ matrix.framework }}_${{ matrix.os }}_${{ matrix.jdk_vendor }}_${{ matrix.jdk_version }} - path: ${{ github.workspace }}/binCLI/logfiles/ + path: ${{ github.workspace }}/logfiles/ retention-days: 7 final_cleanup: From 64e78500de5a42365daaa625e03b9ca008ab238a Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 15:08:51 +0200 Subject: [PATCH 33/52] change --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c933779c3b..353c4319e6 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -430,7 +430,7 @@ jobs: if: ${{ matrix.os != 'windows-latest' }} shell: pwsh run: | - New-Item -Path "${{ github.workspace }}" -Name "logfiles" -ItemType "directory" + New-Item -Path "${{ github.workspace }}" -Name "logfiles" -ItemType Directory Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'zookeeperstart', '-LogPath', '${{ github.workspace }}/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/zookeeper.properties', '-RSE', '${{ github.workspace }}/logfiles/PWSH_zookeeper_err.log', '-RSO', '${{ github.workspace }}/logfiles/PWSH_zookeeper_out.log' ) Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'kafkastart', '-LogPath', '${{ github.workspace }}/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/server.properties', '-RSE', '${{ github.workspace }}/logfiles/PWSH_kafka_err.log', '-RSO', '${{ github.workspace }}/logfiles/PWSH_kafka_out.log' ) env: @@ -440,7 +440,7 @@ jobs: if: ${{ matrix.os == 'windows-latest' }} shell: pwsh run: | - New-Item -Path "${{ github.workspace }}" -Name "logfiles" -ItemType "directory" + New-Item -Path "${{ github.workspace }}" -Name "logfiles" -ItemType Directory Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-LogPath', '${{ github.workspace }}/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/zookeeper.properties', '-RSE', '${{ github.workspace }}/logfiles/PWSH_zookeeper_err.log', '-RSO', '${{ github.workspace }}/logfiles/PWSH_zookeeper_out.log' ) Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-LogPath', '${{ github.workspace }}/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/server.properties', '-RSE', '${{ github.workspace }}/logfiles/PWSH_kafka_err.log', '-RSO', '${{ github.workspace }}/logfiles/PWSH_kafka_out.log' ) env: From 182a2917e1db4f009300a9182afdabcda626a855 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 15:22:58 +0200 Subject: [PATCH 34/52] Update for wrong param --- .github/workflows/build.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 353c4319e6..2ff1d2a260 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -431,8 +431,8 @@ jobs: shell: pwsh run: | New-Item -Path "${{ github.workspace }}" -Name "logfiles" -ItemType Directory - Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'zookeeperstart', '-LogPath', '${{ github.workspace }}/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/zookeeper.properties', '-RSE', '${{ github.workspace }}/logfiles/PWSH_zookeeper_err.log', '-RSO', '${{ github.workspace }}/logfiles/PWSH_zookeeper_out.log' ) - Start-Process -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'kafkastart', '-LogPath', '${{ github.workspace }}/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/server.properties', '-RSE', '${{ github.workspace }}/logfiles/PWSH_kafka_err.log', '-RSO', '${{ github.workspace }}/logfiles/PWSH_kafka_out.log' ) + Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_zookeeper_err.log -RSO ${{ github.workspace }}/logfiles/PWSH_zookeeper_out.log -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'zookeeperstart', '-LogPath', '${{ github.workspace }}/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/zookeeper.properties' ) + Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_kafka_err.log -RSO ${{ github.workspace }}/logfiles/PWSH_kafka_out.log -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'kafkastart', '-LogPath', '${{ github.workspace }}/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/server.properties' ) env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} @@ -441,8 +441,8 @@ jobs: shell: pwsh run: | New-Item -Path "${{ github.workspace }}" -Name "logfiles" -ItemType Directory - Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-LogPath', '${{ github.workspace }}/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/zookeeper.properties', '-RSE', '${{ github.workspace }}/logfiles/PWSH_zookeeper_err.log', '-RSO', '${{ github.workspace }}/logfiles/PWSH_zookeeper_out.log' ) - Start-Process -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-LogPath', '${{ github.workspace }}/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/server.properties', '-RSE', '${{ github.workspace }}/logfiles/PWSH_kafka_err.log', '-RSO', '${{ github.workspace }}/logfiles/PWSH_kafka_out.log' ) + Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_zookeeper_err.log -RSO ${{ github.workspace }}/logfiles/PWSH_zookeeper_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-LogPath', '${{ github.workspace }}/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/zookeeper.properties' ) + Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_kafka_err.log -RSO ${{ github.workspace }}/logfiles/PWSH_kafka_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-LogPath', '${{ github.workspace }}/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/server.properties' ) env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} From 98b1a7ff8227b8558d8fef38895bdd73853693be Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 15:49:17 +0200 Subject: [PATCH 35/52] Report only on failed --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2ff1d2a260..433ca2e9ed 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -475,9 +475,9 @@ jobs: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - uses: actions/upload-artifact@v4 - if: "always()" + if: failure() with: - name: KNet_Server_${{ matrix.framework }}_${{ matrix.os }}_${{ matrix.jdk_vendor }}_${{ matrix.jdk_version }} + name: KNet_Server_${{ matrix.os }}_${{ matrix.framework }}_${{ matrix.jdk_vendor }}_${{ matrix.jdk_version }}_${{ matrix.buffered }}_${{ matrix.extraValue }} path: ${{ github.workspace }}/logfiles/ retention-days: 7 From aa148ff50ee72616e653fefb8cfdc73918326dea Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 15:56:39 +0200 Subject: [PATCH 36/52] start process depends on framework --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 433ca2e9ed..5cb9b6453c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -427,7 +427,7 @@ jobs: java-version: ${{ matrix.jdk_version }} - name: Start Kafka on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} - if: ${{ matrix.os != 'windows-latest' }} + if: ${{ matrix.framework != 'net462' }} shell: pwsh run: | New-Item -Path "${{ github.workspace }}" -Name "logfiles" -ItemType Directory @@ -437,7 +437,7 @@ jobs: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - name: Start Kafka on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} - if: ${{ matrix.os == 'windows-latest' }} + if: ${{ matrix.framework == 'net462' }} shell: pwsh run: | New-Item -Path "${{ github.workspace }}" -Name "logfiles" -ItemType Directory From 6248b721e4cadff080f022488e1ac43c6ecccc80 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 16:38:43 +0200 Subject: [PATCH 37/52] Escape on windows --- .github/workflows/build.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5cb9b6453c..bbab612623 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -427,7 +427,7 @@ jobs: java-version: ${{ matrix.jdk_version }} - name: Start Kafka on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} - if: ${{ matrix.framework != 'net462' }} + if: ${{ matrix.os != 'windows-latest' }} shell: pwsh run: | New-Item -Path "${{ github.workspace }}" -Name "logfiles" -ItemType Directory @@ -437,12 +437,12 @@ jobs: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - name: Start Kafka on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} - if: ${{ matrix.framework == 'net462' }} + if: ${{ matrix.framework == 'windows-latest' }} shell: pwsh run: | New-Item -Path "${{ github.workspace }}" -Name "logfiles" -ItemType Directory - Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_zookeeper_err.log -RSO ${{ github.workspace }}/logfiles/PWSH_zookeeper_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-LogPath', '${{ github.workspace }}/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/zookeeper.properties' ) - Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_kafka_err.log -RSO ${{ github.workspace }}/logfiles/PWSH_kafka_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-LogPath', '${{ github.workspace }}/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/server.properties' ) + Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_zookeeper_err.log -RSO ${{ github.workspace }}\logfiles\PWSH_zookeeper_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-LogPath', '${{ github.workspace }}\\logfiles\\', '-Log4JConfiguration', '${{ github.workspace }}\\bin\\${{ matrix.framework }}\\log4j.properties', '${{ github.workspace }}\\bin\\${{ matrix.framework }}\\zookeeper.properties' ) + Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_kafka_err.log -RSO ${{ github.workspace }}\logfiles\PWSH_kafka_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-LogPath', '${{ github.workspace }}\\logfiles\\', '-Log4JConfiguration', '${{ github.workspace }}\\bin\\${{ matrix.framework }}\\log4j.properties', '${{ github.workspace }}\\bin\\${{ matrix.framework }}\\server.properties' ) env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} From 0bc1c080a84b2135a68d554bdbf9e6776a1c0df7 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 16:56:38 +0200 Subject: [PATCH 38/52] fix condition --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index bbab612623..1bd87229e2 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -437,7 +437,7 @@ jobs: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - name: Start Kafka on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} - if: ${{ matrix.framework == 'windows-latest' }} + if: ${{ matrix.os == 'windows-latest' }} shell: pwsh run: | New-Item -Path "${{ github.workspace }}" -Name "logfiles" -ItemType Directory From 17e64f1555c564c403901dac411074a904be0ec0 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 17:18:50 +0200 Subject: [PATCH 39/52] Update path --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1bd87229e2..66d67d97c7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -441,8 +441,8 @@ jobs: shell: pwsh run: | New-Item -Path "${{ github.workspace }}" -Name "logfiles" -ItemType Directory - Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_zookeeper_err.log -RSO ${{ github.workspace }}\logfiles\PWSH_zookeeper_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-LogPath', '${{ github.workspace }}\\logfiles\\', '-Log4JConfiguration', '${{ github.workspace }}\\bin\\${{ matrix.framework }}\\log4j.properties', '${{ github.workspace }}\\bin\\${{ matrix.framework }}\\zookeeper.properties' ) - Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_kafka_err.log -RSO ${{ github.workspace }}\logfiles\PWSH_kafka_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-LogPath', '${{ github.workspace }}\\logfiles\\', '-Log4JConfiguration', '${{ github.workspace }}\\bin\\${{ matrix.framework }}\\log4j.properties', '${{ github.workspace }}\\bin\\${{ matrix.framework }}\\server.properties' ) + Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_zookeeper_err.log -RSO ${{ github.workspace }}\logfiles\PWSH_zookeeper_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-LogPath', '${{ github.workspace }}\logfiles\', '-Log4JConfiguration', '${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties', '${{ github.workspace }}\bin\${{ matrix.framework }}\zookeeper.properties' ) + Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_kafka_err.log -RSO ${{ github.workspace }}\logfiles\PWSH_kafka_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-LogPath', '${{ github.workspace }}\logfiles\', '-Log4JConfiguration', '${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties', '${{ github.workspace }}\bin\${{ matrix.framework }}\server.properties' ) env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} From abeb8deefd4e1dfd1a0980b35035844d0340c895 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 17:38:31 +0200 Subject: [PATCH 40/52] Try Start-Job since most probably child process dies when the father dies --- .github/workflows/build.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 66d67d97c7..6997cc785d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -441,8 +441,10 @@ jobs: shell: pwsh run: | New-Item -Path "${{ github.workspace }}" -Name "logfiles" -ItemType Directory - Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_zookeeper_err.log -RSO ${{ github.workspace }}\logfiles\PWSH_zookeeper_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-LogPath', '${{ github.workspace }}\logfiles\', '-Log4JConfiguration', '${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties', '${{ github.workspace }}\bin\${{ matrix.framework }}\zookeeper.properties' ) - Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_kafka_err.log -RSO ${{ github.workspace }}\logfiles\PWSH_kafka_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-LogPath', '${{ github.workspace }}\logfiles\', '-Log4JConfiguration', '${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties', '${{ github.workspace }}\bin\${{ matrix.framework }}\server.properties' ) + Start-Job -ScriptBlock { ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-LogPath', '${{ github.workspace }}\logfiles\', '-Log4JConfiguration', '${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties', '${{ github.workspace }}\bin\${{ matrix.framework }}\zookeeper.properties' ) } + Start-Job -ScriptBlock { ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-LogPath', '${{ github.workspace }}\logfiles\', '-Log4JConfiguration', '${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties', '${{ github.workspace }}\bin\${{ matrix.framework }}\server.properties' ) } + # Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_zookeeper_err.log -RSO ${{ github.workspace }}\logfiles\PWSH_zookeeper_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-LogPath', '${{ github.workspace }}\logfiles\', '-Log4JConfiguration', '${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties', '${{ github.workspace }}\bin\${{ matrix.framework }}\zookeeper.properties' ) + # Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_kafka_err.log -RSO ${{ github.workspace }}\logfiles\PWSH_kafka_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-LogPath', '${{ github.workspace }}\logfiles\', '-Log4JConfiguration', '${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties', '${{ github.workspace }}\bin\${{ matrix.framework }}\server.properties' ) env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} From 7ccd129bc6565d2f08799f7ceedce0edf27aec97 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 17:57:49 +0200 Subject: [PATCH 41/52] Use batch --- .github/workflows/build.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6997cc785d..3fc31a0e60 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -438,11 +438,11 @@ jobs: - name: Start Kafka on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} if: ${{ matrix.os == 'windows-latest' }} - shell: pwsh + shell: cmd run: | - New-Item -Path "${{ github.workspace }}" -Name "logfiles" -ItemType Directory - Start-Job -ScriptBlock { ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-LogPath', '${{ github.workspace }}\logfiles\', '-Log4JConfiguration', '${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties', '${{ github.workspace }}\bin\${{ matrix.framework }}\zookeeper.properties' ) } - Start-Job -ScriptBlock { ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-LogPath', '${{ github.workspace }}\logfiles\', '-Log4JConfiguration', '${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties', '${{ github.workspace }}\bin\${{ matrix.framework }}\server.properties' ) } + mkdir ${{ github.workspace }}\logfiles + START /B ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe zookeeperstart -LogPath ${{ github.workspace }}\logfiles\ -Log4JConfiguration ${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties ${{ github.workspace }}\bin\${{ matrix.framework }}\zookeeper.properties + START /B ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe kafkastart -LogPath ${{ github.workspace }}\logfiles\ -Log4JConfiguration ${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties ${{ github.workspace }}\bin\${{ matrix.framework }}\server.properties # Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_zookeeper_err.log -RSO ${{ github.workspace }}\logfiles\PWSH_zookeeper_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-LogPath', '${{ github.workspace }}\logfiles\', '-Log4JConfiguration', '${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties', '${{ github.workspace }}\bin\${{ matrix.framework }}\zookeeper.properties' ) # Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_kafka_err.log -RSO ${{ github.workspace }}\logfiles\PWSH_kafka_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-LogPath', '${{ github.workspace }}\logfiles\', '-Log4JConfiguration', '${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties', '${{ github.workspace }}\bin\${{ matrix.framework }}\server.properties' ) env: From 0c470c044ff05a8228f045a13c7323c4e8bf83d0 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 18:14:30 +0200 Subject: [PATCH 42/52] try in the same shell --- .github/workflows/build.yaml | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3fc31a0e60..567c61aba7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -436,17 +436,17 @@ jobs: env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - name: Start Kafka on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} - if: ${{ matrix.os == 'windows-latest' }} - shell: cmd - run: | - mkdir ${{ github.workspace }}\logfiles - START /B ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe zookeeperstart -LogPath ${{ github.workspace }}\logfiles\ -Log4JConfiguration ${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties ${{ github.workspace }}\bin\${{ matrix.framework }}\zookeeper.properties - START /B ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe kafkastart -LogPath ${{ github.workspace }}\logfiles\ -Log4JConfiguration ${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties ${{ github.workspace }}\bin\${{ matrix.framework }}\server.properties - # Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_zookeeper_err.log -RSO ${{ github.workspace }}\logfiles\PWSH_zookeeper_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-LogPath', '${{ github.workspace }}\logfiles\', '-Log4JConfiguration', '${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties', '${{ github.workspace }}\bin\${{ matrix.framework }}\zookeeper.properties' ) - # Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_kafka_err.log -RSO ${{ github.workspace }}\logfiles\PWSH_kafka_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-LogPath', '${{ github.workspace }}\logfiles\', '-Log4JConfiguration', '${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties', '${{ github.workspace }}\bin\${{ matrix.framework }}\server.properties' ) - env: - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} + # - name: Start Kafka on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} + # if: ${{ matrix.os == 'windows-latest' }} + # shell: cmd + # run: | + # mkdir ${{ github.workspace }}\logfiles + # START /B ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe zookeeperstart -LogPath ${{ github.workspace }}\logfiles\ -Log4JConfiguration ${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties ${{ github.workspace }}\bin\${{ matrix.framework }}\zookeeper.properties + # START /B ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe kafkastart -LogPath ${{ github.workspace }}\logfiles\ -Log4JConfiguration ${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties ${{ github.workspace }}\bin\${{ matrix.framework }}\server.properties + # # Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_zookeeper_err.log -RSO ${{ github.workspace }}\logfiles\PWSH_zookeeper_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-LogPath', '${{ github.workspace }}\logfiles\', '-Log4JConfiguration', '${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties', '${{ github.workspace }}\bin\${{ matrix.framework }}\zookeeper.properties' ) + # # Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_kafka_err.log -RSO ${{ github.workspace }}\logfiles\PWSH_kafka_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-LogPath', '${{ github.workspace }}\logfiles\', '-Log4JConfiguration', '${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties', '${{ github.workspace }}\bin\${{ matrix.framework }}\server.properties' ) + # env: + # JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - name: Executing KNetTest on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} if: ${{ matrix.os != 'windows-latest' }} @@ -458,7 +458,11 @@ jobs: - name: Executing KNetTest on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} if: ${{ matrix.os == 'windows-latest' }} shell: pwsh - run: ${{ github.workspace }}/bin/${{ matrix.framework }}/KNetTest.exe localhost:9092 useConsumeCallback randomizeTopicName ${{ matrix.buffered }} ${{ matrix.extraValue }} + run: | + New-Item -Path "${{ github.workspace }}" -Name "logfiles" -ItemType Directory + Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_zookeeper_err.log -RSO ${{ github.workspace }}\logfiles\PWSH_zookeeper_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-LogPath', '${{ github.workspace }}\logfiles\', '-Log4JConfiguration', '${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties', '${{ github.workspace }}\bin\${{ matrix.framework }}\zookeeper.properties' ) + Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_kafka_err.log -RSO ${{ github.workspace }}\logfiles\PWSH_kafka_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-LogPath', '${{ github.workspace }}\logfiles\', '-Log4JConfiguration', '${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties', '${{ github.workspace }}\bin\${{ matrix.framework }}\server.properties' ) + ${{ github.workspace }}/bin/${{ matrix.framework }}/KNetTest.exe localhost:9092 useConsumeCallback randomizeTopicName ${{ matrix.buffered }} ${{ matrix.extraValue }} env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} From af0d005c7b50c68a83a5cd9f6a8a5b1aa0e42c89 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 18:53:58 +0200 Subject: [PATCH 43/52] Try avoid log clean in Windows due to concurrent use of resources --- tests/net/General/KNetTest/Program.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/net/General/KNetTest/Program.cs b/tests/net/General/KNetTest/Program.cs index bdecf32368..5580cea795 100644 --- a/tests/net/General/KNetTest/Program.cs +++ b/tests/net/General/KNetTest/Program.cs @@ -234,7 +234,9 @@ static void CreateTopic() topic.Configs(map); *********/ topic = topic.Configs(TopicConfigBuilder.Create().WithCleanupPolicy(TopicConfigBuilder.CleanupPolicyTypes.Compact | TopicConfigBuilder.CleanupPolicyTypes.Delete) - .WithDeleteRetentionMs(100) + .WithDeleteRetentionMs(Environment.GetEnvironmentVariable("GITHUB_ACTIONS") != null // try to avoid the activation of log cleaner in windows within wotkflow + && Environment.OSVersion.Platform != PlatformID.Unix ? 86400000 + : 100) .WithMinCleanableDirtyRatio(0.01) .WithMaxMessageBytes(100 * 1024 * 1024) .WithSegmentMs(100)); From b55cf938f8d5169b41355c7e6483267312b5bd66 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 21:43:06 +0200 Subject: [PATCH 44/52] Disable log cleaner in windows to avoid concurrence on file access --- .github/workflows/build.yaml | 3 ++- tests/net/General/KNetTest/Program.cs | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 567c61aba7..be99a68c68 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -454,11 +454,12 @@ jobs: run: dotnet ${{ github.workspace }}/bin/${{ matrix.framework }}/KNetTest.dll localhost:9092 useConsumeCallback randomizeTopicName ${{ matrix.buffered }} ${{ matrix.extraValue }} env: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - + - name: Executing KNetTest on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} if: ${{ matrix.os == 'windows-latest' }} shell: pwsh run: | + Add-Content -Path ${{ github.workspace }}\bin\${{ matrix.framework }}\server.properties -Value 'log.cleaner.enable=false' New-Item -Path "${{ github.workspace }}" -Name "logfiles" -ItemType Directory Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_zookeeper_err.log -RSO ${{ github.workspace }}\logfiles\PWSH_zookeeper_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-LogPath', '${{ github.workspace }}\logfiles\', '-Log4JConfiguration', '${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties', '${{ github.workspace }}\bin\${{ matrix.framework }}\zookeeper.properties' ) Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_kafka_err.log -RSO ${{ github.workspace }}\logfiles\PWSH_kafka_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-LogPath', '${{ github.workspace }}\logfiles\', '-Log4JConfiguration', '${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties', '${{ github.workspace }}\bin\${{ matrix.framework }}\server.properties' ) diff --git a/tests/net/General/KNetTest/Program.cs b/tests/net/General/KNetTest/Program.cs index 5580cea795..bdecf32368 100644 --- a/tests/net/General/KNetTest/Program.cs +++ b/tests/net/General/KNetTest/Program.cs @@ -234,9 +234,7 @@ static void CreateTopic() topic.Configs(map); *********/ topic = topic.Configs(TopicConfigBuilder.Create().WithCleanupPolicy(TopicConfigBuilder.CleanupPolicyTypes.Compact | TopicConfigBuilder.CleanupPolicyTypes.Delete) - .WithDeleteRetentionMs(Environment.GetEnvironmentVariable("GITHUB_ACTIONS") != null // try to avoid the activation of log cleaner in windows within wotkflow - && Environment.OSVersion.Platform != PlatformID.Unix ? 86400000 - : 100) + .WithDeleteRetentionMs(100) .WithMinCleanableDirtyRatio(0.01) .WithMaxMessageBytes(100 * 1024 * 1024) .WithSegmentMs(100)); From dcc8c2eebfa3a684616abca11a3cbc56fd714225 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 22:19:18 +0200 Subject: [PATCH 45/52] Compile only tests to avoid version clash of Newtonsoft.Json --- .github/workflows/build.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index be99a68c68..3b70cf5051 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -184,8 +184,12 @@ jobs: name: KNet path: .\bin\*nupkg - - name: Compile tests - run: dotnet build --no-incremental --configuration Release /p:Platform="Any CPU" /p:NoWarn="0108%3B1030%3B0618" tests\net\KNetTest.sln + - name: Compile only specific tests (KNet.Serialization.Avro uses Apache.Avro which bind to an old version on Newtonsoft.Json) + shell: pwsh + run: | + Remove-Item .\bin\* -Recurse -Force + dotnet build --no-incremental --configuration Release /p:Platform="Any CPU" /p:NoWarn="0108%3B1030%3B0618" tests\net\General\KNetTest\KNetTest.csproj + dotnet build --no-incremental --configuration Release /p:Platform="Any CPU" /p:NoWarn="0108%3B1030%3B0618" tests\net\General\KNetTestSerDes\KNetTestSerDes.csproj env: GITHUB_TEST_PREPARATION: true From accd244e5c86a2ef47f9bdf69d813508d42f5244 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 22:29:48 +0200 Subject: [PATCH 46/52] Change the way the test exit --- tests/net/General/KNetTest/Program.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/net/General/KNetTest/Program.cs b/tests/net/General/KNetTest/Program.cs index bdecf32368..1ee4bed82b 100644 --- a/tests/net/General/KNetTest/Program.cs +++ b/tests/net/General/KNetTest/Program.cs @@ -55,7 +55,7 @@ class Program static int NonParallelLimit = 100000; static long _firstOffset = -1; - static int waitMultiplier = 5; + static int waitMultiplier = 1; static string serverToUse = theServer; static string topicToUse = theTopic; @@ -449,16 +449,19 @@ static void ConsumeSomething() const int checkTime = 200; int waitTime = waitMultiplier * 60 * 1000; Stopwatch swCycleTime = Stopwatch.StartNew(); + int emptyCycle = 0; while (runInParallel ? !resetEvent.WaitOne(0) : elements < NonParallelLimit) { var records = consumer.Poll((long)TimeSpan.FromMilliseconds(checkTime).TotalMilliseconds); watcherTotal.Start(); + emptyCycle++; #if NET7_0_OR_GREATER foreach (var item in records.ApplyPrefetch(withPrefetch, prefetchThreshold: 0)) #else foreach (var item in records) #endif { + emptyCycle = 0; elements++; watcherTotal.Start(); var str = $"Consuming from Offset = {item.Offset}, Key = {item.Key}, Value = {item.Value}"; @@ -467,7 +470,8 @@ static void ConsumeSomething() if (consoleOutput) Console.WriteLine(str); watcher.Stop(); } - if (!runInParallel && swCycleTime.ElapsedMilliseconds > waitTime) + if ((!runInParallel && swCycleTime.ElapsedMilliseconds > waitTime) // elapsed timeout or + || (elements != 0 && emptyCycle > 5)) // if we have at least 5 empty cycle exit { var str = $"Forcibly exit since no {NonParallelLimit} record was received within {waitTime} ms. Current received is {elements}"; if (elements != 0) @@ -671,16 +675,19 @@ static void ConsumeSomethingBuffered() const int checkTime = 200; int waitTime = waitMultiplier * 60 * 1000; Stopwatch swCycleTime = Stopwatch.StartNew(); + int emptyCycle = 0; while (runInParallel ? !resetEvent.WaitOne(0) : elements < NonParallelLimit) { var records = consumer.Poll((long)TimeSpan.FromMilliseconds(checkTime).TotalMilliseconds); watcherTotal.Start(); + emptyCycle++; #if NET7_0_OR_GREATER foreach (var item in records.ApplyPrefetch(withPrefetch, prefetchThreshold: 0)) #else foreach (var item in records) #endif { + emptyCycle = 0; elements++; watcherTotal.Start(); var str = $"Consuming from Offset = {item.Offset}, Key = {item.Key}, Value = {item.Value}"; @@ -689,7 +696,8 @@ static void ConsumeSomethingBuffered() if (consoleOutput) Console.WriteLine(str); watcher.Stop(); } - if (!runInParallel && swCycleTime.ElapsedMilliseconds > waitTime) + if ((!runInParallel && swCycleTime.ElapsedMilliseconds > waitTime) // elapsed timeout or + || (elements != 0 && emptyCycle > 5)) // if we have at least 5 empty cycle after received something { var str = $"Forcibly exit since no {NonParallelLimit} record was received within {waitTime} ms. Current received is {elements}"; if (elements != 0) From d1049437aebebca5163e5e0bda1fce5f5fce24c0 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 22:36:13 +0200 Subject: [PATCH 47/52] Forcibly added Newtonsoft.Json to avoid version clash --- .github/workflows/build.yaml | 7 ++----- tests/net/General/KNetTest/KNetTest.csproj | 3 +++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3b70cf5051..54c1701cfb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -184,12 +184,9 @@ jobs: name: KNet path: .\bin\*nupkg - - name: Compile only specific tests (KNet.Serialization.Avro uses Apache.Avro which bind to an old version on Newtonsoft.Json) + - name: Compile tests shell: pwsh - run: | - Remove-Item .\bin\* -Recurse -Force - dotnet build --no-incremental --configuration Release /p:Platform="Any CPU" /p:NoWarn="0108%3B1030%3B0618" tests\net\General\KNetTest\KNetTest.csproj - dotnet build --no-incremental --configuration Release /p:Platform="Any CPU" /p:NoWarn="0108%3B1030%3B0618" tests\net\General\KNetTestSerDes\KNetTestSerDes.csproj + run: dotnet build --no-incremental --configuration Release /p:Platform="Any CPU" /p:NoWarn="0108%3B1030%3B0618" tests\net\KNetTest.sln env: GITHUB_TEST_PREPARATION: true diff --git a/tests/net/General/KNetTest/KNetTest.csproj b/tests/net/General/KNetTest/KNetTest.csproj index eaa0af8366..0108737454 100644 --- a/tests/net/General/KNetTest/KNetTest.csproj +++ b/tests/net/General/KNetTest/KNetTest.csproj @@ -10,6 +10,9 @@ + + + From 5353f94162a28fb7e01bd5ce37bd3bb47d1537b0 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 22:37:41 +0200 Subject: [PATCH 48/52] fix --- .github/workflows/build.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 54c1701cfb..be99a68c68 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -185,7 +185,6 @@ jobs: path: .\bin\*nupkg - name: Compile tests - shell: pwsh run: dotnet build --no-incremental --configuration Release /p:Platform="Any CPU" /p:NoWarn="0108%3B1030%3B0618" tests\net\KNetTest.sln env: GITHUB_TEST_PREPARATION: true From ae98300cb7f0cda0b271f12844bba114541adda3 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 23:08:12 +0200 Subject: [PATCH 49/52] Disable KNetSerDesTest on net462 --- .github/workflows/build.yaml | 2 +- tests/net/General/KNetTest/Program.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index be99a68c68..f3aab9cbbb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -475,7 +475,7 @@ jobs: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - name: Executing KNetTestSerDes on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} - if: ${{ matrix.os == 'windows-latest' }} + if: ${{ matrix.os == 'windows-latest' && matrix.framework != 'net462' }} # disable in net462 due to error we don't see in local tests and it is quite impossible to verify it on GitHub shell: pwsh run: ${{ github.workspace }}\bin\${{ matrix.framework }}\KNetTestSerDes.exe env: diff --git a/tests/net/General/KNetTest/Program.cs b/tests/net/General/KNetTest/Program.cs index 1ee4bed82b..6d460902de 100644 --- a/tests/net/General/KNetTest/Program.cs +++ b/tests/net/General/KNetTest/Program.cs @@ -137,12 +137,12 @@ static void Main(string[] args) } } - SerDesRaw serializer = new SerDesRaw() + SerDesRaw serializer = new() { OnSerialize = (topic, type) => { return Array.Empty(); } }; - SerDesRaw deserializer = new SerDesRaw() + SerDesRaw deserializer = new() { OnDeserialize = (topic, data) => { return new TestType(0, false, false); } }; From 09b650fb6f4c4448dcd4007ad7376ccb8d9f6992 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 23:16:35 +0200 Subject: [PATCH 50/52] Moved out serdes tests from Main to execute static initializer later --- .github/workflows/build.yaml | 2 +- tests/net/General/KNetTestSerDes/Program.cs | 131 ++++++++++---------- 2 files changed, 67 insertions(+), 66 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f3aab9cbbb..a702023ee0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -475,7 +475,7 @@ jobs: JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - name: Executing KNetTestSerDes on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }} - if: ${{ matrix.os == 'windows-latest' && matrix.framework != 'net462' }} # disable in net462 due to error we don't see in local tests and it is quite impossible to verify it on GitHub + if: ${{ matrix.os == 'windows-latest' }} # && matrix.framework != 'net462' }} # disable in net462 due to error we don't see in local tests and it is quite impossible to verify it on GitHub shell: pwsh run: ${{ github.workspace }}\bin\${{ matrix.framework }}\KNetTestSerDes.exe env: diff --git a/tests/net/General/KNetTestSerDes/Program.cs b/tests/net/General/KNetTestSerDes/Program.cs index aaf93896dd..0ab4a1181f 100644 --- a/tests/net/General/KNetTestSerDes/Program.cs +++ b/tests/net/General/KNetTestSerDes/Program.cs @@ -30,96 +30,97 @@ static void Main(string[] args) try { SharedKNetCore.Create(); -#if NET462_OR_GREATER - // check why and if this is needed in Windows - var str = new Java.Lang.String("test string"); - Console.WriteLine(str); -#endif - byte[] bb, bb1; - - bb = KNetSerialization.SerializeBoolean(false, "test", false); - bb1 = KNetSerialization.SerializeBoolean(true, "test", false); - if (!bb.SequenceEqual(bb1)) throw new System.Exception(); - - if (KNetSerialization.DeserializeBoolean(true, "test", bb) != false) throw new System.Exception(); - bb = KNetSerialization.SerializeBoolean(false, "test", true); - bb1 = KNetSerialization.SerializeBoolean(true, "test", true); - if (!bb.SequenceEqual(bb1)) throw new System.Exception(); + ExecuteTests(); // call tests outside Main so KNetSerialization static initialization happens later and JCOBridge.Global is ready + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + Environment.ExitCode = 1; + } + } - if (KNetSerialization.DeserializeBoolean(true, "test", bb) != true) throw new System.Exception(); + static void ExecuteTests() + { + byte[] bb, bb1; - const int cycles = 100; + bb = KNetSerialization.SerializeBoolean(false, "test", false); + bb1 = KNetSerialization.SerializeBoolean(true, "test", false); + if (!bb.SequenceEqual(bb1)) throw new System.Exception(); - long cycleDelta = short.MaxValue / cycles; + if (KNetSerialization.DeserializeBoolean(true, "test", bb) != false) throw new System.Exception(); - for (short i = 0; i < cycles; i++) - { - short val = (short)(short.MinValue + i * (short)cycleDelta); + bb = KNetSerialization.SerializeBoolean(false, "test", true); + bb1 = KNetSerialization.SerializeBoolean(true, "test", true); + if (!bb.SequenceEqual(bb1)) throw new System.Exception(); - bb = KNetSerialization.SerializeShort(false, "test", val); - bb1 = KNetSerialization.SerializeShort(true, "test", val); - if (!bb.SequenceEqual(bb1)) throw new System.Exception(); + if (KNetSerialization.DeserializeBoolean(true, "test", bb) != true) throw new System.Exception(); - if (KNetSerialization.DeserializeShort(true, "test", bb) != val) throw new System.Exception(); - } + const int cycles = 100; - cycleDelta = int.MaxValue / cycles; + long cycleDelta = short.MaxValue / cycles; - for (int i = 0; i < cycles; i++) - { - int val = int.MinValue + i * (int)cycleDelta; + for (short i = 0; i < cycles; i++) + { + short val = (short)(short.MinValue + i * (short)cycleDelta); - bb = KNetSerialization.SerializeInt(false, "test", val); - bb1 = KNetSerialization.SerializeInt(true, "test", val); - if (!bb.SequenceEqual(bb1)) throw new System.Exception(); + bb = KNetSerialization.SerializeShort(false, "test", val); + bb1 = KNetSerialization.SerializeShort(true, "test", val); + if (!bb.SequenceEqual(bb1)) throw new System.Exception(); - if (KNetSerialization.DeserializeInt(true, "test", bb) != val) throw new System.Exception(); - } + if (KNetSerialization.DeserializeShort(true, "test", bb) != val) throw new System.Exception(); + } - cycleDelta = long.MaxValue / cycles; + cycleDelta = int.MaxValue / cycles; - for (long i = 0; i < cycles; i++) - { - long val = long.MinValue + i * (long)cycleDelta; + for (int i = 0; i < cycles; i++) + { + int val = int.MinValue + i * (int)cycleDelta; - bb = KNetSerialization.SerializeLong(false, "test", val); - bb1 = KNetSerialization.SerializeLong(true, "test", val); - if (!bb.SequenceEqual(bb1)) throw new System.Exception(); + bb = KNetSerialization.SerializeInt(false, "test", val); + bb1 = KNetSerialization.SerializeInt(true, "test", val); + if (!bb.SequenceEqual(bb1)) throw new System.Exception(); - if (KNetSerialization.DeserializeLong(true, "test", bb) != val) throw new System.Exception(); - } + if (KNetSerialization.DeserializeInt(true, "test", bb) != val) throw new System.Exception(); + } - float cycleDeltaF = float.MaxValue / cycles; + cycleDelta = long.MaxValue / cycles; - for (long i = 0; i < cycles; i++) - { - float val = float.MinValue + i * cycleDeltaF; + for (long i = 0; i < cycles; i++) + { + long val = long.MinValue + i * (long)cycleDelta; - bb = KNetSerialization.SerializeFloat(false, "test", val); - bb1 = KNetSerialization.SerializeFloat(true, "test", val); - if (!bb.SequenceEqual(bb1)) throw new System.Exception(); + bb = KNetSerialization.SerializeLong(false, "test", val); + bb1 = KNetSerialization.SerializeLong(true, "test", val); + if (!bb.SequenceEqual(bb1)) throw new System.Exception(); - if (KNetSerialization.DeserializeFloat(true, "test", bb) != val) throw new System.Exception(); - } + if (KNetSerialization.DeserializeLong(true, "test", bb) != val) throw new System.Exception(); + } - double cycleDeltaD = double.MaxValue / cycles; + float cycleDeltaF = float.MaxValue / cycles; - for (long i = 0; i < cycles; i++) - { - double val = double.MinValue + i * cycleDeltaD; + for (long i = 0; i < cycles; i++) + { + float val = float.MinValue + i * cycleDeltaF; - bb = KNetSerialization.SerializeDouble(false, "test", val); - bb1 = KNetSerialization.SerializeDouble(true, "test", val); - if (!bb.SequenceEqual(bb1)) throw new System.Exception(); + bb = KNetSerialization.SerializeFloat(false, "test", val); + bb1 = KNetSerialization.SerializeFloat(true, "test", val); + if (!bb.SequenceEqual(bb1)) throw new System.Exception(); - if (KNetSerialization.DeserializeDouble(true, "test", bb) != val) throw new System.Exception(); - } + if (KNetSerialization.DeserializeFloat(true, "test", bb) != val) throw new System.Exception(); } - catch (Exception e) + + double cycleDeltaD = double.MaxValue / cycles; + + for (long i = 0; i < cycles; i++) { - Console.WriteLine(e.ToString()); - Environment.ExitCode = 1; + double val = double.MinValue + i * cycleDeltaD; + + bb = KNetSerialization.SerializeDouble(false, "test", val); + bb1 = KNetSerialization.SerializeDouble(true, "test", val); + if (!bb.SequenceEqual(bb1)) throw new System.Exception(); + + if (KNetSerialization.DeserializeDouble(true, "test", bb) != val) throw new System.Exception(); } } } From 182e91b6592088c1aae6401c5c5cd53ea60f9fa1 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 26 Jun 2024 23:29:04 +0200 Subject: [PATCH 51/52] Remove condition --- tests/net/Common/SharedKNetCore.cs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/tests/net/Common/SharedKNetCore.cs b/tests/net/Common/SharedKNetCore.cs index 9a292082e7..454a865136 100644 --- a/tests/net/Common/SharedKNetCore.cs +++ b/tests/net/Common/SharedKNetCore.cs @@ -36,16 +36,7 @@ public static void Create() throw new InvalidOperationException("JCOBridge.C2JBridge.JCOBridge.Global is null!!!"); } } -#if NET462_OR_GREATER - public override bool Globalize - { - get - { - Console.WriteLine($"Globalize was {base.Globalize}, set to true"); - return true; - } - } -#endif + public static int ManageException(System.Exception e) { int retCode = 0; From 5879d8a69cda633b076ab63a486ab6e77a9cfea0 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Thu, 27 Jun 2024 00:31:54 +0200 Subject: [PATCH 52/52] Report error condition --- tests/net/General/KNetTest/Program.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/net/General/KNetTest/Program.cs b/tests/net/General/KNetTest/Program.cs index 6d460902de..34c137c27d 100644 --- a/tests/net/General/KNetTest/Program.cs +++ b/tests/net/General/KNetTest/Program.cs @@ -470,10 +470,12 @@ static void ConsumeSomething() if (consoleOutput) Console.WriteLine(str); watcher.Stop(); } - if ((!runInParallel && swCycleTime.ElapsedMilliseconds > waitTime) // elapsed timeout or - || (elements != 0 && emptyCycle > 5)) // if we have at least 5 empty cycle exit + bool elapsedTimeout = !runInParallel && swCycleTime.ElapsedMilliseconds > waitTime; + bool tooManyEmptyCycles = elements != 0 && emptyCycle > 5; + if (elapsedTimeout // exit for elapsed timeout or + || tooManyEmptyCycles) // if we have at least 5 empty cycles after received something { - var str = $"Forcibly exit since no {NonParallelLimit} record was received within {waitTime} ms. Current received is {elements}"; + var str = $"Forcibly exit since no {NonParallelLimit} record was received within {waitTime} ms. Current received is {elements} elapsedTimeout {elapsedTimeout} tooManyEmptyCycles {tooManyEmptyCycles} "; if (elements != 0) { Console.WriteLine(str); @@ -696,10 +698,12 @@ static void ConsumeSomethingBuffered() if (consoleOutput) Console.WriteLine(str); watcher.Stop(); } - if ((!runInParallel && swCycleTime.ElapsedMilliseconds > waitTime) // elapsed timeout or - || (elements != 0 && emptyCycle > 5)) // if we have at least 5 empty cycle after received something + bool elapsedTimeout = !runInParallel && swCycleTime.ElapsedMilliseconds > waitTime; + bool tooManyEmptyCycles = elements != 0 && emptyCycle > 5; + if (elapsedTimeout // exit for elapsed timeout or + || tooManyEmptyCycles) // if we have at least 5 empty cycles after received something { - var str = $"Forcibly exit since no {NonParallelLimit} record was received within {waitTime} ms. Current received is {elements}"; + var str = $"Forcibly exit since no {NonParallelLimit} record was received within {waitTime} ms. Current received is {elements} elapsedTimeout {elapsedTimeout} tooManyEmptyCycles {tooManyEmptyCycles} "; if (elements != 0) { Console.WriteLine(str);