Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix concurrent issue during bundle file concurrent generation testing (…
…halo-dev#6043) #### What type of PR is this? /kind failing-test /area core /milestone 2.17.x #### What this PR does / why we need it: I wrongly invoked `Arraylist#add`(probes) method in multi threads. So the unit test was unstable and might encounter the problem as follows: ```java Expected :1 Actual :0 <Click to see difference> org.opentest4j.AssertionFailedError: expected: <1> but was: <0> at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151) at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132) at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197) at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:166) at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:161) at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:632) at run.halo.app.core.extension.service.impl.PluginServiceImplTest$BundleCacheTest.concurrentComputeBundleFileIfAbsent(PluginServiceImplTest.java:460) ``` See https://github.com/halo-dev/halo/actions/runs/9382059472/job/25832681545 for more. This PR moves the invocation outside thread tasks. #### Does this PR introduce a user-facing change? ```release-note None ```
- Loading branch information