-
Notifications
You must be signed in to change notification settings - Fork 13
Add integration tests for collectors #96
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
Conversation
|
I think 1. could make sense if we have some testing utils to "traverse" a collection of signals. We don't need to encode them either, we can just use the |
|
Excellent, this makes the most sense to me too. Thanks! I am porting the testing server to lwt, to address that part of the issue, and I think I have a clear sense of how to approach the other issue. Thanks! |
We reset the encoder if we are reusing one, and we generate a fresh new one otherwise.
Don't know why I didn't opt for this clearer name originally.
No reason to keep this value hidden, and we want to reuse it for tests.
For testing
These combinators seem tiny, but they simpflify code where they are used quite a lot.
|
I think we could use containers or astring as a test dep, for this kind of issue we see in CI. Or we can bump the minimal OCaml version to 4.13 at least. |
Also document the signal reporter executable
To get access to useful functions that are not in the Stdlib in OCaml 4.08.
|
Yeah, that is nicer than copy pasta of these functions into the tests code :D . I've opted for Containers, and done a little cleanup pass, and CI is green! |
c-cube
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, thank you!
|
Thank you for the review! |
This adds
Initial, obviated discussion from when PR was opened as a draft
This relies on a pair of hacks for getting deterministic output of collected signals, which are then used for expect-style testing.
These hacks are sufficient (locally, at least) for the cohttp-lwt emitter, but still yield non-deterministic output for the ocurl emitter. I have in mind two routes for proper testing here:
I'm opening this as a draft for now, in case anyone is motivated to share opinions on the approach so far, or suggest other ones.