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

Fix ChronicleMethodReaderTest.shouldFilterByMultipleInclusionRegex #1588

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

yevgenp
Copy link
Contributor

@yevgenp yevgenp commented Jun 20, 2024

Closes #1150, #821

@Test
public void shouldFilterByMultipleInclusionRegex() {
basicReader().withInclusionRegex(".*bye$").withInclusionRegex(".*o.*").execute();
basicReader()
.withInclusionRegex(".*bye.*")
Copy link
Contributor

Choose a reason for hiding this comment

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

@yevgenp does this include OR or AND? We should specify in the javadoc what happens if you specify multiple inclusion regexes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AND

Copy link
Contributor

Choose a reason for hiding this comment

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

@tgd I have added javadoc. Please squash/merge if you are happy with this

@Test(expected = IllegalStateException.class)
public void cantMoveToEndDuringDocumentReading() {
File dir = getTmpDir();
try (SingleChronicleQueue queue = ChronicleQueue.singleBuilder(dir).build();
Copy link
Contributor

Choose a reason for hiding this comment

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

as a general note, we should use testBlockSize in tests as per 91bc0e9

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

assertTrue(dc.isMetaData());
assertEquals("header", dc.wire().readEvent(String.class));
assertTrue(tailer.toString().contains("StoreTailer{"));
tailer.toStart();//forbidden
Copy link
Contributor

Choose a reason for hiding this comment

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

love the additional test coverage

Copy link

sonarcloud bot commented Jun 21, 2024

@JerryShea JerryShea requested a review from tgd June 23, 2024 23:02
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.

None yet

2 participants