Skip to content

Commit 83a8ad8

Browse files
authored
chore: fix systemtests CI (#714)
* debug msg on failure * increase current gas by 10x * add debug logging to cosmos sends * Remove Cosmos replacement * remove evm and cosmos replacement * re-add tests and remove the second transaction submission * remove invalid test case * remove non-functional tests
1 parent 296b5ea commit 83a8ad8

File tree

9 files changed

+63
-245
lines changed

9 files changed

+63
-245
lines changed

tests/systemtests/clients/cosmosclient.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ func (c *CosmosClient) BankSend(nodeID, accID string, from, to sdk.AccAddress, a
105105
return nil, fmt.Errorf("failed to broadcast tx: %v", err)
106106
}
107107

108+
// This debug string is useful for transactions that don't yield an error until after they're broadcasted to the chain
109+
fmt.Printf("DEBUG: CosmosClient BankSend: %s\n", resp.String())
110+
108111
return resp, nil
109112
}
110113

tests/systemtests/clients/ethclient.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ func (ec *EthClient) CheckTxsPending(
133133
case <-ticker.C:
134134
pendingTxs, _, err := ec.TxPoolContent(nodeID)
135135
if err != nil {
136+
fmt.Printf("DEBUG: failed to get txpool content: %v", err)
136137
continue // Retry on error
137138
}
138139

tests/systemtests/eip712/eip712_utils.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ func BankSendWithEIP712(
5151
return nil, fmt.Errorf("failed to broadcast tx: %v", err)
5252
}
5353

54+
// This debug string is useful for transactions that don't yield an error until after they're broadcasted to the chain
55+
fmt.Printf("DEBUG: CosmosClient BankSend: %s\n", resp.String())
56+
5457
return resp, nil
5558
}
5659

tests/systemtests/main_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ func TestTxsOrdering(t *testing.T) {
2323
func TestTxsReplacement(t *testing.T) {
2424
mempool.TestTxsReplacement(t)
2525
mempool.TestTxsReplacementWithCosmosTx(t)
26-
mempool.TestMixedTxsReplacementEVMAndCosmos(t)
2726
mempool.TestMixedTxsReplacementLegacyAndDynamicFee(t)
2827
}
2928

tests/systemtests/mempool/interface.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,5 @@ type TestSuite interface {
4242

4343
// Test Utils
4444
AwaitNBlocks(t *testing.T, n int64, duration ...time.Duration)
45+
GetTxGasPrice(baseFee *big.Int) *big.Int
4546
}

tests/systemtests/mempool/test_exceptions.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ func TestTxRebroadcasting(t *testing.T) {
1717
name: "ordering of pending txs %s",
1818
actions: []func(s TestSuite){
1919
func(s TestSuite) {
20-
tx1, err := s.SendTx(t, s.Node(0), "acc0", 0, s.BaseFee(), nil)
20+
tx1, err := s.SendTx(t, s.Node(0), "acc0", 0, s.GetTxGasPrice(s.BaseFee()), nil)
2121
require.NoError(t, err, "failed to send tx")
2222

23-
tx2, err := s.SendTx(t, s.Node(1), "acc0", 1, s.BaseFee(), nil)
23+
tx2, err := s.SendTx(t, s.Node(1), "acc0", 1, s.GetTxGasPrice(s.BaseFee()), nil)
2424
require.NoError(t, err, "failed to send tx")
2525

26-
tx3, err := s.SendTx(t, s.Node(2), "acc0", 2, s.BaseFee(), nil)
26+
tx3, err := s.SendTx(t, s.Node(2), "acc0", 2, s.GetTxGasPrice(s.BaseFee()), nil)
2727
require.NoError(t, err, "failed to send tx")
2828

2929
// Skip tx4 with nonce 3
3030

31-
tx5, err := s.SendTx(t, s.Node(3), "acc0", 4, s.BaseFee(), nil)
31+
tx5, err := s.SendTx(t, s.Node(3), "acc0", 4, s.GetTxGasPrice(s.BaseFee()), nil)
3232
require.NoError(t, err, "failed to send tx")
3333

34-
tx6, err := s.SendTx(t, s.Node(0), "acc0", 5, s.BaseFee(), nil)
34+
tx6, err := s.SendTx(t, s.Node(0), "acc0", 5, s.GetTxGasPrice(s.BaseFee()), nil)
3535
require.NoError(t, err, "failed to send tx")
3636

3737
// At AfterEachAction hook, we will check expected queued txs are not broadcasted.
@@ -49,7 +49,7 @@ func TestTxRebroadcasting(t *testing.T) {
4949
// so, we should set nonce idx to 0.
5050
nonce3Idx := uint64(0)
5151

52-
tx4, err := s.SendTx(t, s.Node(2), "acc0", nonce3Idx, s.BaseFee(), nil)
52+
tx4, err := s.SendTx(t, s.Node(2), "acc0", nonce3Idx, s.GetTxGasPrice(s.BaseFee()), nil)
5353
require.NoError(t, err, "failed to send tx")
5454

5555
// At AfterEachAction hook, we will check expected pending txs are broadcasted.
@@ -96,13 +96,13 @@ func TestMinimumGasPricesZero(t *testing.T) {
9696
name: "sequencial pending txs %s",
9797
actions: []func(s TestSuite){
9898
func(s TestSuite) {
99-
tx1, err := s.SendTx(t, s.Node(0), "acc0", 0, s.BaseFee(), nil)
99+
tx1, err := s.SendTx(t, s.Node(0), "acc0", 0, s.GetTxGasPrice(s.BaseFee()), nil)
100100
require.NoError(t, err, "failed to send tx")
101101

102-
tx2, err := s.SendTx(t, s.Node(1), "acc0", 1, s.BaseFee(), nil)
102+
tx2, err := s.SendTx(t, s.Node(1), "acc0", 1, s.GetTxGasPrice(s.BaseFee()), nil)
103103
require.NoError(t, err, "failed to send tx")
104104

105-
tx3, err := s.SendTx(t, s.Node(2), "acc0", 2, s.BaseFee(), nil)
105+
tx3, err := s.SendTx(t, s.Node(2), "acc0", 2, s.GetTxGasPrice(s.BaseFee()), nil)
106106
require.NoError(t, err, "failed to send tx")
107107

108108
s.SetExpPendingTxs(tx1, tx2, tx3)

tests/systemtests/mempool/test_ordering.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func TestTxsOrdering(t *testing.T) {
3131
nodeId = s.Node(i % 4)
3232
}
3333

34-
txInfo, err := s.SendTx(t, nodeId, "acc0", nonceIdx, s.BaseFee(), big.NewInt(1))
34+
txInfo, err := s.SendTx(t, nodeId, "acc0", nonceIdx, s.GetTxGasPrice(s.BaseFee()), big.NewInt(1))
3535
require.NoError(t, err, "failed to send tx")
3636

3737
// nonce order of committed txs: 0,1,2,3,4

0 commit comments

Comments
 (0)