Skip to content

test: parametrize functional tests for light client mode#7409

Open
glitchminer wants to merge 2 commits into
developfrom
test/light-client-parametrize-clean
Open

test: parametrize functional tests for light client mode#7409
glitchminer wants to merge 2 commits into
developfrom
test/light-client-parametrize-clean

Conversation

@glitchminer

@glitchminer glitchminer commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds waku_light_client parametrization to 11 functional test files so each test runs in both full Waku node and light client mode.

Light client is the transport layer for mobile. These tests previously only ran in full node mode, meaning light-client-specific failures were invisible to CI.

Changes

Each test class gets a @pytest.mark.parametrize("waku_light_client", [False, True], indirect=True) decorator. Per-class fixtures are updated to pass the parameter through to backend_new_profile. No test logic,
assertions, or timeouts are changed.

The light-client parametrize entry is tagged with @pytest.mark.light_client_7393 (registered in tests-functional/pytest.ini) so the known filter-subscription race in #7393 doesn't poison the nightly. The nightly
selector becomes -m "reliability and not light_client_7393". This follows the same convention introduced in #7412 — single grep target for cleanup once #7393 lands.

Reliability files (run by test-reliability.yml nightly):

  • tests/reliability/test_one_to_one_messages.py
  • tests/reliability/test_private_groups_messages.py
  • tests/reliability/test_create_private_groups.py
  • tests/reliability/test_contact_request.py

Wakuext files (parametrized for future coverage; not currently in any selector):

  • tests/test_wakuext_group_chats.py
  • tests/test_wakuext_contact_verification.py
  • tests/test_wakuext_contact_requests.py
  • tests/test_wakuext_message_reactions.py
  • tests/test_wakuext_messages_fetching.py
  • tests/test_wakuext_messages_interacting.py
  • tests/test_wakuext_messages_sending.py

Initial results

Light client variants surface real failures. Across 4 CI runs (3 GitHub Actions 2-core, 1 Codespace 4-core):

Test file Full node Light client (range)
group_chats 10/10 4-8/10 (flaky)
contact_verification 3/3 0-2/3 (flaky)
one_to_one_messages 7/7 2-6/7 (flaky)
contact_request 25/25 22-25/25
private_groups_messages 7/7 0-2/7
create_private_groups 4/4 0-2/4

All light client failures are TimeoutError: Expected 1 signal(s) of type SignalType.MESSAGES_NEW, but got 0 in 60 seconds — consistent with the filter subscription race in #7393. Private group message delivery is most
affected; contact requests are largely unaffected (they don't depend on the post-acceptance filter subscription path). Results are worse under resource pressure (2-core runner vs 4-core), potentially mirroring mobile
device constraints.

Cleanup when #7393 lands

grep -rn light_client_7393 tests-functional/ .github/workflows/ finds:

  • The marker registration in pytest.ini
  • The pytest.mark.light_client_7393 on each LIGHT_CLIENT parametrize entry
  • The not light_client_7393 exclusion in test-reliability.yml

Strip all three.

Test plan

  • pytest --collect-only confirms expected counts:
    • -m "reliability" → 100 tests (50 full + 50 light)
    • -m "reliability and not light_client_7393" → 57 tests (full-node only)
    • -m "light_client_7393" → 91 tests (all light-client variants across reliability + wakuext)
  • Full node variants pass (baseline unchanged)
  • Light client variants surface expected filter-related failures
  • Verified across 4 runs

@github-actions

github-actions Bot commented Apr 10, 2026

Copy link
Copy Markdown

⚠️ Companion PR Required

Add a link to your status-app PR in this PR's description.

Example: https://github.com/status-im/status-app/pull/123

@glitchminer
glitchminer requested a review from at0m1x19 April 10, 2026 12:06
@status-im-auto

status-im-auto commented Apr 10, 2026

Copy link
Copy Markdown
Member

Jenkins Builds

Click to see older builds (15)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ f513ad4 1 2026-04-10 12:06:40 ~4 min linux/status-go 📦zip
✔️ f513ad4 1 2026-04-10 12:07:09 ~4 min macos/status-go 📦zip
✔️ f513ad4 1 2026-04-10 12:11:15 ~8 min windows/status-go 📦zip
✖️ f513ad4 1 2026-04-10 12:19:46 ~17 min tests-rpc 📄log
✔️ f513ad4 1 2026-04-10 12:37:31 ~35 min tests 📄log
✔️ f3a0d7a 2 2026-04-10 12:39:19 ~3 min linux/status-go 📦zip
✔️ f3a0d7a 2 2026-04-10 12:39:56 ~4 min macos/status-go 📦zip
✔️ f3a0d7a 2 2026-04-10 12:43:49 ~8 min windows/status-go 📦zip
✖️ f3a0d7a 2 2026-04-10 12:54:01 ~18 min tests-rpc 📄log
✔️ f3a0d7a 2 2026-04-10 13:14:33 ~36 min tests 📄log
✔️ 8ff93da 3 2026-04-16 12:43:07 ~4 min linux/status-go 📦zip
✔️ 8ff93da 3 2026-04-16 12:44:10 ~5 min macos/status-go 📦zip
✔️ 8ff93da 3 2026-04-16 12:46:46 ~7 min windows/status-go 📦zip
✔️ 8ff93da 3 2026-04-16 12:55:52 ~17 min tests-rpc 📄log
✔️ 8ff93da 3 2026-04-16 13:12:18 ~33 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 023fde6 4 2026-05-04 07:59:27 ~4 min linux/status-go 📦zip
✔️ 023fde6 4 2026-05-04 08:00:15 ~4 min macos/status-go 📦zip
✔️ 023fde6 4 2026-05-04 08:05:38 ~10 min windows/status-go 📦zip
✔️ 023fde6 4 2026-05-04 08:11:30 ~15 min tests-rpc 📄log
✔️ 023fde6 4 2026-05-04 08:28:43 ~33 min tests 📄log
✔️ 3bba0c0 5 2026-05-04 08:14:56 ~4 min linux/status-go 📦zip
✔️ 3bba0c0 5 2026-05-04 08:15:46 ~4 min macos/status-go 📦zip
✔️ 3bba0c0 5 2026-05-04 08:19:09 ~8 min windows/status-go 📦zip
✔️ 3bba0c0 5 2026-05-04 08:27:31 ~15 min tests-rpc 📄log
✖️ 3bba0c0 5 2026-05-04 09:03:38 ~34 min tests 📄log

@glitchminer
glitchminer force-pushed the test/light-client-parametrize-clean branch from f513ad4 to f3a0d7a Compare April 10, 2026 12:35
@codecov

codecov Bot commented Apr 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.99%. Comparing base (24d0132) to head (8ff93da).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7409      +/-   ##
===========================================
- Coverage    61.09%   60.99%   -0.10%     
===========================================
  Files          836      836              
  Lines       117120   117120              
===========================================
- Hits         71553    71439     -114     
- Misses       38193    38297     +104     
- Partials      7374     7384      +10     
Flag Coverage Δ
functional 39.55% <ø> (-0.30%) ⬇️
unit 55.24% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 23 files with indirect coverage changes

@at0m1x19 at0m1x19 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets add a marker tied to the bug (e.g. light_client_7393) on the light client parametrization, and exclude it from the nightly in .github/workflows/test-reliability.yml:

-m "reliability and not light_client_7393


# Waku light client test IDs
FULL_NODE = "wakuV2LightClient_False"
LIGHT_CLIENT = "wakuV2LightClient_True"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop already has 5 files using inline string IDs:

ids=["wakuV2LightClient_False", "wakuV2LightClient_True"]          

Here is the list of files: test_wakuext_messages_sending.py, test_wakuext_message_reactions.py, test_wakuext_contact_requests.py, test_wakuext_messages_fetching.py, test_wakuext_messages_interacting.py

Introducing FULL_NODE/LIGHT_CLIENT constants and use them in the new files we leaving the repo in a mixed state. I can suggest update the existing 5 files to use the new constants.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @at0m1x19. Done, I've set xfail instead of the marker just now but fine to align on marker if you prefer.

@glitchminer
glitchminer force-pushed the test/light-client-parametrize-clean branch from f3a0d7a to 8ff93da Compare April 16, 2026 12:38
@glitchminer
glitchminer requested a review from at0m1x19 April 16, 2026 12:49
@glitchminer
glitchminer force-pushed the test/light-client-parametrize-clean branch from 8ff93da to 023fde6 Compare May 4, 2026 07:55
@glitchminer
glitchminer requested review from a team and 0xM3R as code owners May 4, 2026 07:55
Parametrize all functional tests to run in both full node and light
client mode. Light client params marked xfail(strict=False) for
#7393. Replace inline string IDs with constants.
Aligns with the convention introduced in #7412: tag the
LIGHT_CLIENT parametrize entry with a named, issue-tied marker and
exclude it from the reliability nightly via the workflow selector
instead of using xfail strict=False.

Single grep target for cleanup once #7393 lands.

- Register light_client_7393 marker in tests-functional/pytest.ini
- Update test-reliability.yml: -m "reliability and not light_client_7393"
- Replace xfail mark with light_client_7393 across 11 test files
@glitchminer
glitchminer force-pushed the test/light-client-parametrize-clean branch from 023fde6 to 3bba0c0 Compare May 4, 2026 08:10
@glitchminer

Copy link
Copy Markdown
Contributor Author

Switched to the marker approach. light_client_7393 registered in pytest.ini, applied to the LIGHT_CLIENT parametrize entry in all 11 files, and -m "reliability and not light_client_7393" in test-reliability.yml. Aligns with the convention in #7412

@glitchminer
glitchminer requested a review from fbarbu15 May 4, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants