Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daphne integration test. #346

Merged
merged 8 commits into from
Aug 3, 2022
Merged

Daphne integration test. #346

merged 8 commits into from
Aug 3, 2022

Conversation

branlwyd
Copy link
Contributor

@branlwyd branlwyd commented Jul 31, 2022

Also, refactor the existing Janus-only integration test to use the same
code as the new Daphne-Janus integration tests.

The hermetic Daphne instances are implemented by including a compiled
version of Daphne as an artifact, and running it inside miniflare, based
heavily on the manual instructions in the Daphne repository. Miniflare
is now a required dependency for running tests; instructions for running
tests & updating the version of Daphne used for tests is included in the
README.md. Ideally, we would start a container, but Daphne does not yet
build out a suitable container.

My next steps will be chatting with the Daphne folks to see if I can
contribute most of this logic to Daphne itself, which would be a more
maintainable arrangement.

The daphne_janus test is currently flaky; I believe that this reveals
a real functional issue, but I'm going to dig in separately from this
PR.

Fixes #341.

@branlwyd branlwyd force-pushed the bran/daphne-integration-test branch 4 times, most recently from 9b9fc86 to 9c42731 Compare August 1, 2022 01:10
Also, refactor the existing Janus-only integration test to use the same
code as the new Daphne-Janus integration tests.

The hermetic Daphne instances are implemented by including a compiled
version of Daphne as an artifact, and running it inside miniflare, based
heavily on the manual instructions in the Daphne repository. Miniflare
is now a required dependency for running tests; instructions for running
tests & updating the version of Daphne used for tests is included in the
README.md. Ideally, we would start a container, but Daphne does not yet
build out a suitable container.
@branlwyd branlwyd force-pushed the bran/daphne-integration-test branch from 9c42731 to 52fbc76 Compare August 1, 2022 01:12
@branlwyd branlwyd changed the title WIP -- Daphne integration test Daphne integration test. Aug 1, 2022
@branlwyd branlwyd marked this pull request as ready for review August 1, 2022 01:15
@branlwyd branlwyd requested a review from a team as a code owner August 1, 2022 01:15
@divergentdave
Copy link
Collaborator

I think we could use a tracing subscriber in each of the new test functions as well.

This is evidently required on some workstations/OS'es. It's not required
on mine, but it also doesn't cause problems.

Also, fixup a stale comment.
Prior to this commit, the miniflare instance running Daphne hermetic
test instances would listen for connections on real network interfaces.
Now, we only listen for connections on loopback, matching the behavior
of the Janus hemetic test instances.
This works around an issue in Daphne where some measurements will not be
included in the final aggregate when Daphne is in the leader position,
causing the final aggregated value to be incorrect. I work around this
instead of disabling the test in order to show that most of the
functionality still works.
@branlwyd
Copy link
Contributor Author

branlwyd commented Aug 3, 2022

N.B. we are currently working around the Daphne issue that made the test flaky. We work around the issue instead of disabling the test in order to maintain that most of the functionality (i.e. the protocol back-and-forth) still works.

@branlwyd branlwyd merged commit 25f41be into main Aug 3, 2022
@branlwyd branlwyd deleted the bran/daphne-integration-test branch August 3, 2022 18:50
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.

Integration test against an independent DAP implementation
2 participants