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

Fixed "Failed to delete temp like" in IngestableDataChecker under Win… #2584

Merged

Conversation

lbownik
Copy link
Contributor

@lbownik lbownik commented Nov 14, 2024

Refactored IngestableDataChecker to use generic ByteBuffer.

Refactored test to use in-momory buffers instaed of memory-mapped temporaty files.

}

@AfterEach
public void tearDown() {
private AbstractStringAssert<?> assertThatADATA(final String content)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why ADATA? Maybe better naming would be assertThatDATFormat?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

}

private AbstractStringAssert<?> assertThatSAV(final String content)
Copy link
Contributor

Choose a reason for hiding this comment

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

Analogous to above would suggest assertThatSAVFormat?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

return buff;
}
@Test
public void testingADATA_returnsMimeType_forProperContent() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

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

When adding new tests, the convention for test methods is to start with the method being tested as prefix, eg testDTAformat_returnsMimeType_forProperContent. Check methods below as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

}

private AbstractStringAssert<?> assertThatADATAFormat(final String content)
Copy link
Contributor

Choose a reason for hiding this comment

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

There's still ADATA instead of DTA in the name.

private void msg(String m) {
System.out.println(m);
@Test
public void testADATAformat_returnsMimeType_forProperContent() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

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

There's still ADATA instead of DTA in the name.

assertEquals(result, "application/x-stata-13");


public void testingSAVformat_returnsMimeType_forProperContent() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be testSAVformat_...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

msg("result 2c: " + result);
assertEquals(result, null);

public void testingSAVformat_returnsNull_forBrokenContent() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be testSAVformat_...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@lbownik lbownik merged commit 21e42d3 into develop Nov 15, 2024
1 check passed
@lbownik lbownik deleted the fixed_failed_to_delete_temp_file_in_IngestableDataCheckerTest branch November 15, 2024 08:41
private void msg(String m) {
System.out.println(m);
@Test
public void testADATAformat_returnsMimeType_forProperContent() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

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

You missed to change ADATA in the method name before merging.

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.

2 participants