-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fixed "Failed to delete temp like" in IngestableDataChecker under Win… #2584
Conversation
} | ||
|
||
@AfterEach | ||
public void tearDown() { | ||
private AbstractStringAssert<?> assertThatADATA(final String content) |
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.
Why ADATA
? Maybe better naming would be assertThatDATFormat
?
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.
Fixed
} | ||
|
||
private AbstractStringAssert<?> assertThatSAV(final String content) |
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.
Analogous to above would suggest assertThatSAVFormat
?
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.
Fixed
return buff; | ||
} | ||
@Test | ||
public void testingADATA_returnsMimeType_forProperContent() throws Exception { |
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.
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.
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.
Fixed
} | ||
|
||
private AbstractStringAssert<?> assertThatADATAFormat(final String content) |
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.
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 { |
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.
There's still ADATA
instead of DTA
in the name.
assertEquals(result, "application/x-stata-13"); | ||
|
||
|
||
public void testingSAVformat_returnsMimeType_forProperContent() throws Exception { |
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.
Should be testSAVformat_...
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.
Fixed
msg("result 2c: " + result); | ||
assertEquals(result, null); | ||
|
||
public void testingSAVformat_returnsNull_forBrokenContent() throws Exception { |
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.
Should be testSAVformat_...
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.
Fixed
…tableDataCheckerTest
private void msg(String m) { | ||
System.out.println(m); | ||
@Test | ||
public void testADATAformat_returnsMimeType_forProperContent() throws Exception { |
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.
You missed to change ADATA
in the method name before merging.
Refactored IngestableDataChecker to use generic ByteBuffer.
Refactored test to use in-momory buffers instaed of memory-mapped temporaty files.