Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

tests: make integration test more stable #1488

Merged
merged 41 commits into from
Dec 23, 2022
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
d0e290f
wait new blk right before send tx
mmsqe Nov 22, 2022
bf43d11
larger timeout_commit for priority test
mmsqe Nov 22, 2022
017c443
larger timeout_commit for mempool related test
mmsqe Nov 23, 2022
4769ba2
mv chain id test to cluster used test
mmsqe Nov 23, 2022
468ea2d
keep cluster in module scope
mmsqe Nov 23, 2022
4629205
sync gomod2nix
mmsqe Nov 24, 2022
4b8a4e6
adjust timeout_commit
mmsqe Nov 24, 2022
3515a3d
rm prune all in indexer config
mmsqe Nov 28, 2022
1509f32
add missing min_gas_multiplier
mmsqe Nov 28, 2022
5d5b761
wait 1 more blk in upgrade
mmsqe Nov 28, 2022
df0ecc9
only keep 2 validators
mmsqe Nov 28, 2022
c02f04b
add retry for grpc_eth_call
mmsqe Nov 28, 2022
ac41f32
wait 1 block before stop
mmsqe Nov 28, 2022
30b0c61
fix lint
mmsqe Nov 28, 2022
f4a106d
disable recheck
mmsqe Nov 30, 2022
ad876a0
bump up upgrade
mmsqe Nov 30, 2022
9bda14d
Merge branch 'main' into stable_test
mmsqe Nov 30, 2022
6ffe847
sync gomod2nix
mmsqe Nov 30, 2022
ba3bfc8
Apply suggestions from code review
mmsqe Nov 30, 2022
91bc698
Apply suggestions from code review
mmsqe Nov 30, 2022
3c16925
Merge branch 'main' into stable_test
mmsqe Nov 30, 2022
60c4328
append node log
mmsqe Dec 1, 2022
c3ad838
Merge branch 'main' into stable_test
mmsqe Dec 1, 2022
5a625fd
fix lint
mmsqe Dec 1, 2022
77e9990
expect less gas after ecd76396eb55dc44535842018c5f13f234af7da3
mmsqe Dec 1, 2022
9a40293
Merge branch 'main' into stable_test
fedekunze Dec 2, 2022
5a7283a
Merge branch 'main' into stable_test
fedekunze Dec 5, 2022
12385ea
allow retry continue on empty rsp
mmsqe Dec 5, 2022
a8d8d5e
Merge branch 'main' into stable_test
mmsqe Dec 5, 2022
e49f98c
update gomod2nix
facs95 Dec 8, 2022
58d3add
fix flake
facs95 Dec 8, 2022
02e611f
Merge branch 'main' into stable_test
facs95 Dec 8, 2022
89f92ea
mod tidy
mmsqe Dec 9, 2022
86eb2c3
keep grpc only test
mmsqe Dec 9, 2022
fc91abe
Merge branch 'main' into stable_test
mmsqe Dec 9, 2022
b1c72e2
Merge branch 'main' into stable_test
mmsqe Dec 16, 2022
fa34ce9
Merge branch 'main' into stable_test
mmsqe Dec 19, 2022
71472c2
Merge branch 'main' into stable_test
facs95 Dec 22, 2022
6e45dc0
tests(integration): enable recheck tx mode
GAtom22 Dec 22, 2022
7845edf
Merge pull request #5 from GAtom22/add-recheck
mmsqe Dec 23, 2022
673093d
update gomod2nix
facs95 Dec 23, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions gomod2nix.toml
Original file line number Diff line number Diff line change
Expand Up @@ -497,20 +497,20 @@ schema = 3
version = "v0.0.0-20220722155223-a9213eeb770e"
hash = "sha256-kNgzydWRpjm0sZl4uXEs3LX5L0xjJtJRAFf/CTlYUN4="
[mod."golang.org/x/net"]
version = "v0.2.0"
hash = "sha256-0MqnHDdLkkau6k7hlWD9MzIoAFROvxulyT+KzZkSXOs="
version = "v0.4.0"
hash = "sha256-7IwGZh/xg4mQz88cJio2Ov5d3jGRXKj1itlAja/EAbQ="
[mod."golang.org/x/oauth2"]
version = "v0.0.0-20221014153046-6fdb5e3db783"
hash = "sha256-IoygidVNqyAZmN+3macDeIefK8hhJToygpcqlwehdYQ="
[mod."golang.org/x/sync"]
version = "v0.1.0"
hash = "sha256-Hygjq9euZ0qz6TvHYQwOZEjNiTbTh1nSLRAWZ6KFGR8="
[mod."golang.org/x/sys"]
version = "v0.2.0"
hash = "sha256-N6yfQH7R2gfcvyWTQZbxWuSNyVy6hAxiab2WFzgAykI="
version = "v0.3.0"
hash = "sha256-TIHhfYbZ99sCU1ZMikxwomXH5AEtD/lA1VMMW+UAhbU="
[mod."golang.org/x/term"]
version = "v0.2.0"
hash = "sha256-azcllZ0o/9TurqX9udaJ0o9yxqSoI0/bSJsvQQLYIQc="
version = "v0.3.0"
hash = "sha256-NKv2o8wz8DB/2W2h/muGEIHb+S06mBXZxhG254RpQ5s="
[mod."golang.org/x/text"]
version = "v0.5.0"
hash = "sha256-ztH+xQyM/clOcQl+y/UEPcfNKbc3xApMbEPDDZ9up0o="
Expand Down
5 changes: 3 additions & 2 deletions tests/integration_tests/configs/cosmovisor.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ local config = import 'default.jsonnet';

config {
'ethermint_9000-1'+: {
'app-config'+: {
'minimum-gas-prices': '100000000000aphoton',
},
genesis+: {
app_state+: {
feemarket+: {
params+: {
no_base_fee: false,
base_fee:: super.base_fee,
initial_base_fee: super.base_fee,
fedekunze marked this conversation as resolved.
Show resolved Hide resolved
},
},
},
Expand Down
5 changes: 1 addition & 4 deletions tests/integration_tests/configs/default.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@
cmd: 'ethermintd',
'start-flags': '--trace',
config: {
consensus: {
// larger timeout for more stable mempool tests
timeout_commit: '2s',
},
mempool: {
// use v1 mempool to enable tx prioritization
version: 'v1',
recheck: false,
mmsqe marked this conversation as resolved.
Show resolved Hide resolved
mmsqe marked this conversation as resolved.
Show resolved Hide resolved
},
},
'app-config': {
Expand Down
13 changes: 9 additions & 4 deletions tests/integration_tests/configs/enable-indexer.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@ config {
},
},
'app-config'+: {
pruning: 'everything',
'state-sync'+: {
'snapshot-interval': 0,
},
'json-rpc'+: {
'enable-indexer': true,
},
},
genesis+: {
app_state+: {
feemarket+: {
params+: {
min_gas_multiplier: '0',
},
},
},
},
},
}
11 changes: 11 additions & 0 deletions tests/integration_tests/configs/long_timeout_commit.jsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
local default = import 'default.jsonnet';

default {
'ethermint_9000-1'+: {
config+: {
consensus+: {
timeout_commit: '5s',
},
},
},
}
9 changes: 9 additions & 0 deletions tests/integration_tests/configs/pruned_node.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,14 @@ config {
'snapshot-interval': 0,
},
},
genesis+: {
app_state+: {
feemarket+: {
params+: {
min_gas_multiplier: '0',
},
},
},
},
},
}
2 changes: 1 addition & 1 deletion tests/integration_tests/configs/rollback-test.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local config = import 'default.jsonnet';

config {
'ethermint_9000-1'+: {
validators: super.validators + [{
validators: super.validators[0:1] + [{
name: 'fullnode',
}],
},
Expand Down
4 changes: 2 additions & 2 deletions tests/integration_tests/configs/upgrade-test-package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ let
released = pkgs.buildGo118Module rec {
name = "ethermintd";
# the commit before https://github.com/evmos/ethermint/pull/943
src = fetchEthermint "f21592ebfe74da7590eb42ed926dae970b2a9a3f";
src = fetchEthermint "8866ae0ffd67a104e9d1cf4e50fba8391dda6c45";
fedekunze marked this conversation as resolved.
Show resolved Hide resolved
subPackages = [ "cmd/ethermintd" ];
vendorSha256 = "sha256-ABm5t6R/u2S6pThGrgdsqe8n3fH5tIWw7a57kxJPbYw=";
vendorSha256 = "sha256-oDtMamNlwe/393fZd+RNtRy6ipWpusbco8Xg1ZuKWYw=";
doCheck = false;
};
current = pkgs.callPackage ../../../. { };
Expand Down
34 changes: 1 addition & 33 deletions tests/integration_tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from pathlib import Path

import pytest

from .network import setup_custom_ethermint, setup_ethermint, setup_geth
from .network import setup_ethermint, setup_geth


@pytest.fixture(scope="session")
Expand All @@ -11,42 +9,12 @@ def ethermint(tmp_path_factory):
yield from setup_ethermint(path, 26650)


@pytest.fixture(scope="session")
def ethermint_indexer(tmp_path_factory):
path = tmp_path_factory.mktemp("indexer")
yield from setup_custom_ethermint(
path, 26660, Path(__file__).parent / "configs/enable-indexer.jsonnet"
)


@pytest.fixture(scope="session")
def geth(tmp_path_factory):
path = tmp_path_factory.mktemp("geth")
yield from setup_geth(path, 8545)


@pytest.fixture(
scope="session", params=["ethermint", "geth", "ethermint-ws", "enable-indexer"]
)
def cluster(request, ethermint, ethermint_indexer, geth):
"""
run on both ethermint and geth
"""
provider = request.param
if provider == "ethermint":
yield ethermint
elif provider == "geth":
yield geth
elif provider == "ethermint-ws":
ethermint_ws = ethermint.copy()
ethermint_ws.use_websocket()
yield ethermint_ws
elif provider == "enable-indexer":
yield ethermint_indexer
else:
raise NotImplementedError


@pytest.fixture(
scope="session", params=["ethermint", "ethermint-ws"]
)
Expand Down
10 changes: 7 additions & 3 deletions tests/integration_tests/cosmoscli.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from pystarport.utils import build_cli_args_safe, interact

DEFAULT_GAS_PRICE = "5000000000000aphoton"
DEFAULT_GAS = "250000"


class ChainCommand:
Expand Down Expand Up @@ -636,16 +637,19 @@ def edit_validator(
)

def gov_propose(self, proposer, kind, proposal, **kwargs):
method = "submit-legacy-proposal"
kwargs.setdefault("gas_prices", DEFAULT_GAS_PRICE)
kwargs.setdefault("gas", DEFAULT_GAS)
if kind == "software-upgrade":
return json.loads(
self.raw(
"tx",
"gov",
"submit-proposal",
method,
kind,
proposal["name"],
"-y",
"--no-validate",
from_=proposer,
# content
title=proposal.get("title"),
Expand All @@ -664,7 +668,7 @@ def gov_propose(self, proposer, kind, proposal, **kwargs):
self.raw(
"tx",
"gov",
"submit-proposal",
method,
kind,
"-y",
from_=proposer,
Expand All @@ -685,7 +689,7 @@ def gov_propose(self, proposer, kind, proposal, **kwargs):
self.raw(
"tx",
"gov",
"submit-proposal",
method,
kind,
fp.name,
"-y",
Expand Down
Loading