kaiyaok2 commented on PR #1754:
URL: https://github.com/apache/tika/pull/1754#issuecomment-2106037067
@THausherr @tballison I confirmed that the two lines in `@BeforeEach`
**does not** create a new repo if one exists from a previous test run:
```
TikaConfig config =
kaiyaok2 commented on PR #1754:
URL: https://github.com/apache/tika/pull/1754#issuecomment-2105684175
> getMimeRepository
@THausherr I think it might the case. I wrote this dummy test, and it fails
under surefire:
```
@Test
public void testResetRepo() throws Exception {
THausherr commented on PR #1754:
URL: https://github.com/apache/tika/pull/1754#issuecomment-2105679546
Maybe I get it: `repo = config.getMimeRepository();` isn't creating anything
new, it's retrieving something that is changed later by the test? If my
understanding is correct then it's a
kaiyaok2 commented on PR #1754:
URL: https://github.com/apache/tika/pull/1754#issuecomment-2105675512
> The `repo` is refreshed with each unit test in the `@BeforeEach` call,
though. Is NIODetector respecting that?
@tballison Yes, NIOInspector uses the JUnit Jupiter engine and takes
tballison commented on PR #1754:
URL: https://github.com/apache/tika/pull/1754#issuecomment-2105664986
The `repo` is refreshed with each unit test in the `@BeforeEach` call,
though. Is NIODetector respecting that?
--
This is an automated message from the Apache Git Service.
To respond to
kaiyaok2 opened a new pull request, #1754:
URL: https://github.com/apache/tika/pull/1754
Fixes https://issues.apache.org/jira/projects/TIKA/issues/TIKA-4254
### Brief Description of the Bug
The test `TestMimeTypes#testJavaRegex` is non-idempotent, as it passes in
the first run