remove old commented out test in FakeValuesTest#1570
Conversation
The loading synchronization was later implemented in `LazyEvaluated`, and this commit adds a similar test `LazyEvaluatedTest`.
PR Summary
|
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1570 +/- ##
=========================================
Coverage 92.43% 92.43%
+ Complexity 3328 3327 -1
=========================================
Files 330 330
Lines 6554 6554
Branches 643 643
=========================================
Hits 6058 6058
+ Misses 340 339 -1
- Partials 156 157 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
The %s is the parameter, the %n is a newline.On 21 Jun 2025, at 08:19, Rick M ***@***.***> wrote:
@kingthorin commented on this pull request.
In src/test/java/net/datafaker/internal/helper/LazyEvaluatedTest.java:
+ @test
+ void notInitializedUntilCalled() {
+ assertThat(executions.get()).isEqualTo(0);
+ }
+
+ @test
+ void initializedOnlyOnce() throws InterruptedException {
+ int threadsCount = 5;
+ ExecutorService threadPool = newFixedThreadPool(threadsCount);
+
+ for (int i = 0; i < threadsCount; i++) {
+ threadPool.submit(() -> {
+ try {
+ assertThat(lazyEvaluated.get()).isEqualTo(1);
+ } catch (Throwable e) {
+ System.out.printf("Loading failed...%s%n", e);
Two placeholders but only one param? (Could be fine, I never use printf)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
The loading synchronization was later implemented in
LazyEvaluated, and this commit adds a similar testLazyEvaluatedTest.