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

Add more thorough tests for protocol and general behavior #2

Open
marcelog opened this issue Jan 25, 2018 · 0 comments
Open

Add more thorough tests for protocol and general behavior #2

marcelog opened this issue Jan 25, 2018 · 0 comments

Comments

@marcelog
Copy link
Collaborator

We're currently missing tests that exercise all the code and behavior involved:

  1. Supervision tree
  2. Accepting connections and receiving traffic for the different protocol versions.
  3. KPL aggregated records (as sent by KCL)
  4. Records that are neither KPL/Custom KPL (as sent by KCL)

We do have some tests that actually run some parts of the code, but a good set of integration tests would come in handy (to test incoming data from KCL, how the code behaves and interacts with our users).

Something that can be used for this is to have a small tool built in our tests that will actually connect to the erlmld server, send traffic, and assert the behavior at different parts of the code. In addition, creating some implementations of the erlmld behaviors to make those assertions and test (between other things) checkpointing, etc.

elbrujohalcon pushed a commit that referenced this issue Jul 19, 2018
To control if it should or not deflate,  the library was
accepting a flag on kpl_agg:finish/2.

But, this wasn't applied to aggregated records created implicitly
when adding new items.

This PR makes the should_deflate part of the state, and allow it
to be initialized using kpl_agg:new/1  (default is to not deflate).

Note:
It has a backward incompatible change, as kpl_agg:finish/2 is removed.
elbrujohalcon added a commit that referenced this issue Jul 19, 2018
* make the should_deflate flag part of the state (#2)

To control if it should or not deflate,  the library was
accepting a flag on kpl_agg:finish/2.

But, this wasn't applied to aggregated records created implicitly
when adding new items.

This PR makes the should_deflate part of the state, and allow it
to be initialized using kpl_agg:new/1  (default is to not deflate).

Note:
It has a backward incompatible change, as kpl_agg:finish/2 is removed.

* Avoid cuadratic complexity,  keep track of current list length (#3)

Do not calculate length(List) on each item addition,  keep a track
of the current buffer length.

* Remove dialyzer warnings

* Fix #stream_record.timestamp type
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

No branches or pull requests

1 participant