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 some initial binary queue samples #9570

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

andrewvc
Copy link
Contributor

@andrewvc andrewvc commented May 14, 2018

Tests for old binary queues. Currently only tests 6.3.0.

I think this is ready for review. I think I should remove all the examples from before 6.3.0 since we know they are all problematic. However, I want to get a second opinion before I throw them away. Thoughts?

@andrewvc andrewvc changed the title WIP Add some initial binary queue samples Add some initial binary queue samples May 18, 2018
@andrewvc
Copy link
Contributor Author

@original-brownbear @danhermann thoughts on this?

@danhermann
Copy link
Contributor

Ideally, these samples would include an exhaustive set of types that can be serialized. It would also be nice if the test could verify that all possible types were present in a particular sample by checking against the list of available converters here:

https://github.com/elastic/logstash/blob/master/logstash-core/src/main/java/org/logstash/Valuefier.java#L100-L155

That's still a little tricky since there's a fall-through converter that attempts to convert based on the assignability of a class to anything in the above list. I don't know if these test criteria are overly ambitious for right now, but it's definitely something I intend to do for PQv2.

* @param omitParentDir omit the parent dir the zip is packaged with
* @throws IOException
*/
public static void unzipToDirectory(final ZipInputStream input, final Path output, boolean omitParentDir) throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor -- I prefer putting code that's used only in tests somewhere in the test source tree.

Copy link
Member

Choose a reason for hiding this comment

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

+1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

+1

@original-brownbear
Copy link
Member

@andrewvc @danhermann as far as I can see we have all the types in here with the exception of BigDecimal don't we?
I like this one I think :)

@danhermann
Copy link
Contributor

What about nil, symbols, floats? And I like the test, too. I just think it would be ideal if the test itself verified that it was testing all possible types though, as I said, that may not be necessary at this point.

@original-brownbear
Copy link
Member

Right and those :)

@andrewvc
Copy link
Contributor Author

@danhermann @original-brownbear thanks for the feedback.

I'll incorporate it. I should have had the config reviewed before generating samples.

@original-brownbear
Copy link
Member

@andrewvc np. Actually, before you waste your time regenerating all the samples one thought:

Do we even need to generate anything but data for 6.2.4 and 6.3.x+? There's so many known compatibility issues there and we decided not to write a transcoder as far as I understand. Why even test these cases, they'll always be broken?

@andrewvc
Copy link
Contributor Author

@original-brownbear good point, let's just generate 6.3.0, we don't even promise 6.2.4 compat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants