From 3664390b3fc904b75609b834c7b367498ec16514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Eckel?= Date: Thu, 16 May 2024 16:55:08 +0200 Subject: [PATCH] * added another Waiting block to the machine attestation methods (CI tests) * had to adjust the test cases to the impact of that change. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jürgen Eckel --- tests/e2e/dao/pop/selection_suite.go | 14 ++++++-------- tests/e2e/machine/suite.go | 1 + 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/e2e/dao/pop/selection_suite.go b/tests/e2e/dao/pop/selection_suite.go index c4452e1..0b001fb 100644 --- a/tests/e2e/dao/pop/selection_suite.go +++ b/tests/e2e/dao/pop/selection_suite.go @@ -164,9 +164,9 @@ func (s *SelectionE2ETestSuite) TestPopSelectionNoActors() { } func (s *SelectionE2ETestSuite) TestPopSelectionOneActors() { - err := e2etestutil.AttestMachine(s.network, machines[0].name, machines[0].mnemonic, 0, s.feeDenom) + err := monitor.AddParticipant(machines[0].address, time.Now().Unix()) s.Require().NoError(err) - err = monitor.AddParticipant(machines[0].address, time.Now().Unix()) + err = e2etestutil.AttestMachine(s.network, machines[0].name, machines[0].mnemonic, 0, s.feeDenom) s.Require().NoError(err) out := s.perpareLocalTest() @@ -176,9 +176,9 @@ func (s *SelectionE2ETestSuite) TestPopSelectionOneActors() { } func (s *SelectionE2ETestSuite) TestPopSelectionTwoActors() { - err := e2etestutil.AttestMachine(s.network, machines[1].name, machines[1].mnemonic, 1, s.feeDenom) + err := monitor.AddParticipant(machines[1].address, time.Now().Unix()) s.Require().NoError(err) - err = monitor.AddParticipant(machines[1].address, time.Now().Unix()) + err = e2etestutil.AttestMachine(s.network, machines[1].name, machines[1].mnemonic, 1, s.feeDenom) s.Require().NoError(err) out := s.perpareLocalTest() @@ -310,13 +310,11 @@ func (s *SelectionE2ETestSuite) TestTokenRedeemClaim() { // QueryRedeemClaim qOut, err := clitestutil.ExecTestCLICmd(val.ClientCtx, daocli.CmdShowRedeemClaim(), []string{"liquidAddress", "0"}) s.Require().NoError(err) - // from 5993150682 to 3995433788 due to more waiting blocks (CI race conditions) - assert.Equal(s.T(), "redeemClaim:\n amount: \"3995433788\"\n beneficiary: liquidAddress\n confirmed: true\n creator: plmnt1kp93kns6hs2066d8qw0uz84fw3vlthewt2ck6p\n id: \"0\"\n liquidTxHash: \"0000000000000000000000000000000000000000000000000000000000000000\"\n", qOut.String()) + assert.Equal(s.T(), "redeemClaim:\n amount: \"5993150682\"\n beneficiary: liquidAddress\n confirmed: true\n creator: plmnt1kp93kns6hs2066d8qw0uz84fw3vlthewt2ck6p\n id: \"0\"\n liquidTxHash: \"0000000000000000000000000000000000000000000000000000000000000000\"\n", qOut.String()) qOut, err = clitestutil.ExecTestCLICmd(val.ClientCtx, daocli.CmdRedeemClaimByLiquidTxHash(), []string{"0000000000000000000000000000000000000000000000000000000000000000"}) s.Require().NoError(err) - // from 5993150682 to 3995433788 due to more waiting blocks (CI race conditions) - assert.Equal(s.T(), "redeemClaim:\n amount: \"3995433788\"\n beneficiary: liquidAddress\n confirmed: true\n creator: plmnt1kp93kns6hs2066d8qw0uz84fw3vlthewt2ck6p\n id: \"0\"\n liquidTxHash: \"0000000000000000000000000000000000000000000000000000000000000000\"\n", qOut.String()) + assert.Equal(s.T(), "redeemClaim:\n amount: \"5993150682\"\n beneficiary: liquidAddress\n confirmed: true\n creator: plmnt1kp93kns6hs2066d8qw0uz84fw3vlthewt2ck6p\n id: \"0\"\n liquidTxHash: \"0000000000000000000000000000000000000000000000000000000000000000\"\n", qOut.String()) } func (s *SelectionE2ETestSuite) createValAccount(cfg network.Config) (address sdk.AccAddress, err error) { diff --git a/tests/e2e/machine/suite.go b/tests/e2e/machine/suite.go index 029f8ba..2a1008b 100644 --- a/tests/e2e/machine/suite.go +++ b/tests/e2e/machine/suite.go @@ -68,6 +68,7 @@ func (s *E2ETestSuite) TestAttestMachine() { out, err := e2etestutil.BuildSignBroadcastTx(s.T(), val.Address, msg1) s.Require().NoError(err) + s.Require().NoError(s.network.WaitForNextBlock()) s.Require().NoError(s.network.WaitForNextBlock()) rawLog, err := clitestutil.GetRawLogFromTxOut(val, out) s.Require().NoError(err)