From dabe1b13ea933d721fedc4e18b29cf01e31408b0 Mon Sep 17 00:00:00 2001 From: Ramil Mustafin Date: Thu, 23 May 2024 10:00:58 +0300 Subject: [PATCH 1/5] disable parallel and update testContainersVer and add delay for peertest Signed-off-by: Ramil Mustafin --- gradle.properties | 2 +- .../client/src/test/kotlin/jp/co/soramitsu/iroha2/PeerTest.kt | 1 + modules/client/src/test/resources/junit-platform.properties | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index e8a64ae7f..a6715dded 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ i2pCryptoEddsa=0.3.0 multihashVersion=1.3.0 googleTinkVer=1.9.0 # testing -testContainersVer=1.18.3 +testContainersVer=1.19.8 junitVersion=5.9.3 # logging logbackVer=1.2.3 diff --git a/modules/client/src/test/kotlin/jp/co/soramitsu/iroha2/PeerTest.kt b/modules/client/src/test/kotlin/jp/co/soramitsu/iroha2/PeerTest.kt index d0dd08ce9..7f585e742 100644 --- a/modules/client/src/test/kotlin/jp/co/soramitsu/iroha2/PeerTest.kt +++ b/modules/client/src/test/kotlin/jp/co/soramitsu/iroha2/PeerTest.kt @@ -57,6 +57,7 @@ class PeerTest : IrohaTest() { startNewContainer(keyPair, alias).use { registerPeer(address, payload) + delay(3000) assertTrue(isPeerAvailable(address, payload)) } } diff --git a/modules/client/src/test/resources/junit-platform.properties b/modules/client/src/test/resources/junit-platform.properties index 1d27b78fb..13ed53b4f 100644 --- a/modules/client/src/test/resources/junit-platform.properties +++ b/modules/client/src/test/resources/junit-platform.properties @@ -1 +1 @@ -junit.jupiter.execution.parallel.enabled=true +junit.jupiter.execution.parallel.enabled=false From aaf677b1aaad780b1b7c32f5b4841d9a8204bc44 Mon Sep 17 00:00:00 2001 From: Ramil Mustafin Date: Thu, 23 May 2024 10:20:03 +0300 Subject: [PATCH 2/5] change pr workflow runner to self-hosted Signed-off-by: Ramil Mustafin --- .github/workflows/iroha2-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/iroha2-pr.yml b/.github/workflows/iroha2-pr.yml index 25c3d4929..6d6c636c2 100644 --- a/.github/workflows/iroha2-pr.yml +++ b/.github/workflows/iroha2-pr.yml @@ -5,7 +5,7 @@ on: branches: [ iroha2-dev, iroha2-main ] jobs: build: - runs-on: ubuntu-latest + runs-on: iroha-ubuntu-latest steps: - uses: actions/checkout@v3 From a61d89a9bb67445b2d925efd2cafe4675cf4a488 Mon Sep 17 00:00:00 2001 From: Ramil Mustafin Date: Thu, 23 May 2024 10:39:08 +0300 Subject: [PATCH 3/5] revert pr workflow runner Signed-off-by: Ramil Mustafin --- .github/workflows/iroha2-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/iroha2-pr.yml b/.github/workflows/iroha2-pr.yml index 6d6c636c2..25c3d4929 100644 --- a/.github/workflows/iroha2-pr.yml +++ b/.github/workflows/iroha2-pr.yml @@ -5,7 +5,7 @@ on: branches: [ iroha2-dev, iroha2-main ] jobs: build: - runs-on: iroha-ubuntu-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 73f0646620c4f87c8491218f85c3625d7deb05e2 Mon Sep 17 00:00:00 2001 From: Ramil Mustafin Date: Thu, 23 May 2024 10:47:45 +0300 Subject: [PATCH 4/5] add delay to startnewcontainer set true waitStrategy Signed-off-by: Ramil Mustafin --- .../client/src/test/kotlin/jp/co/soramitsu/iroha2/PeerTest.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/client/src/test/kotlin/jp/co/soramitsu/iroha2/PeerTest.kt b/modules/client/src/test/kotlin/jp/co/soramitsu/iroha2/PeerTest.kt index 7f585e742..fdeb8ef8b 100644 --- a/modules/client/src/test/kotlin/jp/co/soramitsu/iroha2/PeerTest.kt +++ b/modules/client/src/test/kotlin/jp/co/soramitsu/iroha2/PeerTest.kt @@ -95,6 +95,7 @@ class PeerTest : IrohaTest() { startNewContainer(keyPair, alias).use { container -> registerPeer(address, payload) + delay(3000) assertTrue(isPeerAvailable(address, payload)) delay(5000) @@ -138,7 +139,7 @@ class PeerTest : IrohaTest() { alias: String, ): IrohaContainer { return IrohaContainer { - this.waitStrategy = false + this.waitStrategy = true this.keyPair = keyPair this.alias = alias this.networkToJoin = containers.first().network ?: throw IrohaSdkException("Container network not found") From 361dcb687a05f09258d33bc5a031aa3e1086138f Mon Sep 17 00:00:00 2001 From: Ramil Mustafin Date: Thu, 23 May 2024 13:57:57 +0300 Subject: [PATCH 5/5] remove delays revert false waitStrategy Signed-off-by: Ramil Mustafin --- .../client/src/test/kotlin/jp/co/soramitsu/iroha2/PeerTest.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/client/src/test/kotlin/jp/co/soramitsu/iroha2/PeerTest.kt b/modules/client/src/test/kotlin/jp/co/soramitsu/iroha2/PeerTest.kt index fdeb8ef8b..d0dd08ce9 100644 --- a/modules/client/src/test/kotlin/jp/co/soramitsu/iroha2/PeerTest.kt +++ b/modules/client/src/test/kotlin/jp/co/soramitsu/iroha2/PeerTest.kt @@ -57,7 +57,6 @@ class PeerTest : IrohaTest() { startNewContainer(keyPair, alias).use { registerPeer(address, payload) - delay(3000) assertTrue(isPeerAvailable(address, payload)) } } @@ -95,7 +94,6 @@ class PeerTest : IrohaTest() { startNewContainer(keyPair, alias).use { container -> registerPeer(address, payload) - delay(3000) assertTrue(isPeerAvailable(address, payload)) delay(5000) @@ -139,7 +137,7 @@ class PeerTest : IrohaTest() { alias: String, ): IrohaContainer { return IrohaContainer { - this.waitStrategy = true + this.waitStrategy = false this.keyPair = keyPair this.alias = alias this.networkToJoin = containers.first().network ?: throw IrohaSdkException("Container network not found")