Commit Graph
6 Commits
Author SHA1 Message Date
Egor Rachkovskii f2c64a3a8e test(e2e): port the remaining channel delivery scenarios
Six channel tests were left behind in the interop repo when the suite
moved here, so the paths they cover — ingress filtering by content topic,
causal ordering, late joiners, three-way fan-out and channel re-creation —
are unguarded in this repo's CI.

Bring them over: RC04 send-after-close, RC07 foreign content topic, RC08
bidirectional causal order, RC09 late-joining receiver, RC12 three
participants, RC13 close/re-create then send.

RC07 and RC08 get store off like every other channel test; the interop
copies left the fixture default on, which pins an archive to the shared
working directory for no reason of theirs.
2026-08-17 15:26:25 +01:00
Egor Rachkovskii 4b4e2996a3 test(e2e): give every channel test a per-run channel id
SDS persists its state per channelId and restores it on create, so the
fixed ids these tests used carried one run's causal history into the next
and made repeated local runs diverge from a clean CI run.

Call unique_channel_id(), which has been sitting unused in
wrapper_helpers since the delivery tests landed, and rename the constants
it now seeds from *_ID to *_PREFIX so the name says what the value is.
2026-08-17 15:19:46 +01:00
Egor Rachkovskii 23b0d31e84 test(e2e): port the channel delivery tests and the isolated sender process (#4117)
Three open PRs in logos-delivery-interop-tests add 19 channel-API tests
(RC07-RC09 #203, RC10-RC12 #209, RC13 #212). Their wrapper API surface is
already covered here, but the pieces they import were not, so those tests could
not be written in core. This ports them.

subprocess_node.py, rc05/rc06 and the closed-channel test come from interop
master; the two wrapper_helpers additions are byte-identical to what #209/#212
add, so the RC07-RC13 ports apply cleanly.

Why a spawned subprocess: co-located nodes both default localStoragePath to
./data and share data/sds.db, so the receiver drops the sender's own channel
message as a duplicate. The interop rationale blaming a process-wide Persistency
singleton is false since #4109 made Persistency per-node; the shared storage path
is the cause, and chdir to a private temp dir is what isolates it. A per-node
localStoragePath would likely replace the spawn machinery, but RC07-RC13 build on
the ported form.

Why the re-subscribe in the closed-channel test: channel_close unsubscribes the
content topic and subscriptions are not refcounted (#4081, tracked in #4087), so
the receiver re-subscribes to keep message_received as the arrival witness. This
follows the resolution in the still-open interop PR #212.

Non-docker collection goes 48 -> 51; README updated. Suite: 48 passed, 2 skipped,
1 xfailed, verified over two back-to-back runs.
2026-08-12 19:03:09 +01:00
Fabiana Cecin f4c5a703e0 fix(ffi): event listeners lifetime (#4118) 2026-08-12 09:59:41 -03:00
Egor Rachkovskii 342a965370 test(e2e): port remaining wrapper tests from the interop repo (#4077)
* test(e2e): port remaining wrapper tests from the interop repo

The wrapper suite that moved into tests-e2e (#4027) was a reworked subset of
the one still living in logos-delivery-interop-tests. Comparing both sides
showed 21 tests here against 46 there, with no overlap in the delta: the 25
missing tests cover scenarios the reworked set never included.

Ports those 25 tests, bringing the in-repo suite to the full 46:
  - 12 send scenarios: s01 (nil/destroyed handle), s03, s04, s05, s11, s13,
    s16, s18 (both orderings), s25, s29
  - 7 channel lifecycle tests (rc01-rc04)
  - 6 wrapper corner cases: auto port allocation, MyBoundPorts, ENR

Supporting changes the ported tests need:
  - wrapper_helpers: get_node_tcp_port, get_node_bound_ports, enr_udp_port
  - WrapperManager: channel_create/send/close, destroy_keep_ctx
  - vendored binding refreshed to the revision exposing the channel API
    (additive only; cffi resolves symbols lazily, so nothing existing moves)

Two Edge senders were fixed while porting. build_node_config defaults relay
and store to True, and the flat-JSON config path applies mode=Edge before
explicit fields, so those defaults win: the Edge nodes in s11/s16/s25 came up
as relay and store servers and exercised the relay path instead of lightpush.
They now set relay=False and store=False, matching test_send_e2e_part2. s16
also dropped lightpush=True, which mounts the lightpush server and fails node
start once relay is off; the lightpush client mounts unconditionally.

Suite goes from 21 to 46 functions (53 collected). The docker subset grows
from 3 to 5 as s11 and s25 need a store peer. Local run against a freshly
built library: 45 passed, 2 skipped, 1 xfailed.

* test(e2e): enable autosharding in the channel lifecycle tests

channel_create subscribes to the channel's content topic since #4081, and
resolving that topic to a shard needs autosharding. build_node_config leaves
numShardsInNetwork at 0 and cluster 198 has no preset, so these nodes came up
with static sharding and every channel_create failed with "autosharding is not
configured; pass an explicit shard".

Adds numShardsInNetwork=1 to the six tests that create a channel, matching what
every other wrapper test that touches the send or channel API already does.
rc02 is left alone: channel_send rejects on the id lookup before any shard is
resolved.

Verified locally against a fresh build: the five tests that complete now pass
and the error string is gone from the run.
2026-08-10 08:36:28 +01:00
Egor Rachkovskii 8ad99f10f4 Add in-repo API/e2e test suite (tests-e2e) (#4027)
Migrate the liblogosdelivery API/wrapper pytest suite into tests-e2e/ and run it in CI (e2e-api-tests.yml) against the built library. Edge senders use the real lightpush path (relay=False).
2026-07-23 11:06:01 +01:00