Skip to content

Commit cce86f5

Browse files
committed
fixed test
1 parent d1710fb commit cce86f5

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/check-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
if: always()
6161
with:
6262
report_paths: '**/target/test-reports/*.xml'
63-
create_check: true
63+
create_check: false
6464
check_name: 'Check PR'
6565
- name: Archive logs
6666
uses: actions/upload-artifact@v4

consensus-client-it/src/test/scala/units/BaseDockerTestSuite.scala

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,19 @@ import com.wavesplatform.common.state.ByteStr
66
import com.wavesplatform.common.utils.EitherExt2.explicitGet
77
import com.wavesplatform.utils.ScorexLogging
88
import monix.execution.atomic.AtomicBoolean
9+
import org.scalactic.source.Position
910
import org.scalatest.freespec.AnyFreeSpec
1011
import org.scalatest.matchers.should.Matchers
1112
import org.scalatest.{BeforeAndAfterAll, EitherValues, OptionValues}
13+
import org.web3j.protocol.core.DefaultBlockParameterName
1214
import sttp.client3.{HttpClientSyncBackend, Identity, SttpBackend}
1315
import units.client.HttpChainContractClient
1416
import units.client.contract.HasConsensusLayerDappTxHelpers
1517
import units.client.engine.model.BlockNumber
1618
import units.docker.*
1719
import units.docker.WavesNodeContainer.generateWavesGenesisConfig
1820
import units.el.{NativeBridgeClient, StandardBridgeClient}
19-
import units.eth.Gwei
21+
import units.eth.{EthAddress, Gwei}
2022
import units.test.{CustomMatchers, IntegrationTestEventually, TestEnvironment}
2123

2224
import scala.sys.process.{Process, ProcessLogger}
@@ -110,13 +112,23 @@ trait BaseDockerTestSuite
110112
waves1.api.waitForHeight(epoch1Number)
111113
}
112114

115+
private def waitForContract(address: EthAddress)(implicit pos: Position): Unit = eventually {
116+
ec1.web3j.ethGetCode(address.toString, DefaultBlockParameterName.LATEST).send().getCode shouldNot be("0x")
117+
}
118+
113119
protected def deploySolidityContracts(): Unit = {
114120
step("Deploy contracts on EL")
115121
Process(
116122
s"forge script -vvvvv scripts/IT.s.sol:IT --private-key $elRichAccount1PrivateKey --fork-url http://localhost:${ec1.rpcPort} --broadcast",
117123
TestEnvironment.ContractsDir,
118124
"CHAIN_ID" -> EcContainer.ChainId.toString
119125
).!(ProcessLogger(out => log.info(out), err => log.error(err)))
126+
127+
eventually {
128+
waitForContract(StandardBridgeAddress)
129+
waitForContract(WWavesAddress)
130+
waitForContract(TErc20Address)
131+
}
120132
}
121133

122134
override protected def step(text: String): Unit = {

0 commit comments

Comments
 (0)