Re: [PR] TIKA-4254 - Fix non-idempotent unit test `TestMimeTypes#testJavaRegex` [tika]

2024-05-11 Thread via GitHub
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 =

Re: [PR] TIKA-4254 - Fix non-idempotent unit test `TestMimeTypes#testJavaRegex` [tika]

2024-05-11 Thread via GitHub
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 {

Re: [PR] TIKA-4254 - Fix non-idempotent unit test `TestMimeTypes#testJavaRegex` [tika]

2024-05-11 Thread via GitHub
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

Re: [PR] TIKA-4254 - Fix non-idempotent unit test `TestMimeTypes#testJavaRegex` [tika]

2024-05-11 Thread via GitHub
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

Re: [PR] TIKA-4254 - Fix non-idempotent unit test `TestMimeTypes#testJavaRegex` [tika]

2024-05-11 Thread via GitHub
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

[PR] TIKA-4254 - Fix non-idempotent unit test `TestMimeTypes#testJavaRegex` [tika]

2024-05-11 Thread via GitHub
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