From 7b8477373c838b15ae3ad2021665abfed2c6c8d8 Mon Sep 17 00:00:00 2001 From: aya Date: Fri, 27 Dec 2024 11:32:01 +0200 Subject: [PATCH] Modify test command to have 16 shards --- .github/workflows/test_common.yml | 16 +++++----------- tests/relay/test_rln.py | 1 + tests/store/test_cursor_many_msgs.py | 1 + 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test_common.yml b/.github/workflows/test_common.yml index 4876a5ec..f987f27c 100644 --- a/.github/workflows/test_common.yml +++ b/.github/workflows/test_common.yml @@ -37,9 +37,7 @@ jobs: name: tests strategy: matrix: - shard: [ 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23, - 24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48, - 49,50,51,52,53,54,55,56,57,58,59,60,61,62] + shard: [ 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] runs-on: ubuntu-latest timeout-minutes: 120 @@ -53,18 +51,14 @@ jobs: - uses: actions/setup-python@v4 with: python-version: '3.12' - cache: 'pip' - + cache: 'pip' + - run: pip install -r requirements.txt - name: Run tests run: | - if [ "${{ matrix.shard }}" == 7 ]; then - pytest --reruns 2 --dist=loadfile tests/store/test_cursor_many_msgs.py -n 1 --alluredir=allure-results-${{ matrix.shard }} - elif [ "${{ matrix.shard }}" == 1 ]; then - pytest --dist=loadfile tests/relay/test_rln.py -n 1 --alluredir=allure-results-${{ matrix.shard }} - elif [ "${{ matrix.shard }}" != 1 ]; then - pytest --ignore=tests/relay/test_rln.py --ignore=tests/store/test_cursor_many_msgs.py --reruns 2 -n=4 --shard-id=${{ matrix.shard }} --num-shards=63 --alluredir=allure-results-${{ matrix.shard }} + pytest -m "not rln and not store2000" --reruns 2 --shard-id=${{ matrix.shard }} + --num-shards=16 --alluredir=allure-results-${{ matrix.shard }} fi diff --git a/tests/relay/test_rln.py b/tests/relay/test_rln.py index b39d2ac9..6942f2aa 100644 --- a/tests/relay/test_rln.py +++ b/tests/relay/test_rln.py @@ -14,6 +14,7 @@ logger = get_custom_logger(__name__) @pytest.mark.xdist_group(name="RLN serial tests") +@pytest.mark.rln @pytest.mark.skipif("go-waku" in (NODE_1 + NODE_2), reason="Test works only with nwaku") class TestRelayRLN(StepsRLN, StepsRelay): SAMPLE_INPUTS_RLN = SAMPLE_INPUTS + SAMPLE_INPUTS + SAMPLE_INPUTS diff --git a/tests/store/test_cursor_many_msgs.py b/tests/store/test_cursor_many_msgs.py index 618ba218..086f7da3 100644 --- a/tests/store/test_cursor_many_msgs.py +++ b/tests/store/test_cursor_many_msgs.py @@ -11,6 +11,7 @@ class TestCursorManyMessages(StepsStore): # we implicitly test the reusabilty of the cursor for multiple nodes @pytest.mark.timeout(540) + @pytest.mark.store2000 def test_get_multiple_2000_store_messages(self): expected_message_hash_list = [] for i in range(2000):