Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anhductn2001 committed Sep 12, 2024
1 parent 7826990 commit f62fbc6
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
1 change: 1 addition & 0 deletions clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ rm -rf /tmp/rollapp*
rm -rf /tmp/dym*
rm -rf /tmp/sequencer*
rm -rf /tmp/celes*
rm -rf /tmp/gaia*
echo "Clean success!!"

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ replace (

require (
github.com/decentrio/e2e-testing-live v0.0.0-20240718080249-ee255229c869
github.com/decentrio/rollup-e2e-testing v0.0.0-20240910125642-713999d966fa
github.com/decentrio/rollup-e2e-testing v0.0.0-20240911110829-da071a3f1628
github.com/dymensionxyz/dymension/v3 v3.1.0-rc03.0.20240717194206-54c0fca5fada
github.com/dymensionxyz/dymint v1.2.0-rc01
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -770,8 +770,8 @@ github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c h1:pFUpOrbxDR
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U=
github.com/decentrio/e2e-testing-live v0.0.0-20240718080249-ee255229c869 h1:qWpUYGOsrSC+1Vmd2TjhbsSpntvvx9PsX3AoeMunFxc=
github.com/decentrio/e2e-testing-live v0.0.0-20240718080249-ee255229c869/go.mod h1:HZNYnPwmSxkwTPjSD5yolauc1Vx1ZzKL4FFMxTq4H5Y=
github.com/decentrio/rollup-e2e-testing v0.0.0-20240910125642-713999d966fa h1:J9OvuBnlwmk1RQ+tsCFhu88utTakheQLW+7BVhnxixw=
github.com/decentrio/rollup-e2e-testing v0.0.0-20240910125642-713999d966fa/go.mod h1:QmBrZgZplhtgHRWC0Z7LC7TDsKuC8sDyQvZyXXaqw/c=
github.com/decentrio/rollup-e2e-testing v0.0.0-20240911110829-da071a3f1628 h1:BaQci/ieiQ7+N0sRouA+CznSzPDbOx+ae/LsgcCQgSs=
github.com/decentrio/rollup-e2e-testing v0.0.0-20240911110829-da071a3f1628/go.mod h1:QmBrZgZplhtgHRWC0Z7LC7TDsKuC8sDyQvZyXXaqw/c=
github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4=
github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo=
github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI=
Expand Down
11 changes: 7 additions & 4 deletions tests/disconnection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ func TestDisconnection_EVM(t *testing.T) {
dymintTomlOverrides["settlement_gas_prices"] = "0adym"
dymintTomlOverrides["max_idle_time"] = "3s"
dymintTomlOverrides["max_proof_time"] = "500ms"
dymintTomlOverrides["batch_submit_max_time"] = "5s"
dymintTomlOverrides["batch_submit_time"] = "5s"
dymintTomlOverrides["batch_submit_max_time"] = "20s"
dymintTomlOverrides["batch_submit_time"] = "20s"
dymintTomlOverrides["block_batch_max_size_bytes"] = "1000"
dymintTomlOverrides["max_supported_batch_skew"] = "1"
dymintTomlOverrides["max_batch_skew"] = "1"
dymintTomlOverrides["batch_acceptance_attempts"] = "1"
dymintTomlOverrides["batch_acceptance_timeout"] = "5s"
dymintTomlOverrides["p2p_blocksync_enabled"] = "false"
Expand Down Expand Up @@ -196,6 +196,7 @@ func TestDisconnection_EVM(t *testing.T) {

// Wait for rollapp finalized
rollapp1Height, err := rollapp1.Height(ctx)
fmt.Println(rollapp1Height)
require.NoError(t, err)
dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollapp1Height, 300)

Expand All @@ -205,13 +206,15 @@ func TestDisconnection_EVM(t *testing.T) {

// Wait until rollapp stops produce block
rollappHeight, err := rollapp1.Height(ctx)
fmt.Println(rollappHeight)
require.NoError(t, err)

err = testutil.WaitForCondition(
time.Minute*10,
time.Second*5, // each epoch is 5 seconds
func() (bool, error) {
newRollappHeight, err := rollapp1.Height(ctx)
fmt.Println(newRollappHeight)
require.NoError(t, err)

if newRollappHeight > rollappHeight {
Expand Down Expand Up @@ -251,7 +254,7 @@ func TestDisconnection_Wasm(t *testing.T) {
dymintTomlOverrides["batch_submit_max_time"] = "5s"
dymintTomlOverrides["batch_submit_time"] = "5s"
dymintTomlOverrides["block_batch_max_size_bytes"] = "1000"
dymintTomlOverrides["max_supported_batch_skew"] = "1"
dymintTomlOverrides["max_batch_skew"] = "1"
dymintTomlOverrides["batch_acceptance_attempts"] = "1"
dymintTomlOverrides["batch_acceptance_timeout"] = "5s"
dymintTomlOverrides["p2p_blocksync_enabled"] = "false"
Expand Down
9 changes: 8 additions & 1 deletion tests/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,17 @@ var (
GasAdjustment: 2,
TrustingPeriod: "112h",
NoHostMount: false,
ModifyGenesis: nil,
ModifyGenesis: cosmos.ModifyGenesis(gaiaGenesisKV),
ConfigFileOverrides: nil,
}

gaiaGenesisKV = []cosmos.GenesisKV{
{
Key: "app_state.staking.params.unbonding_time",
Value: "600s",
},
}

rollappEVMGenesisKV = []cosmos.GenesisKV{
{
Key: "app_state.sequencers.params.unbonding_time",
Expand Down

0 comments on commit f62fbc6

Please sign in to comment.