@@ -133,13 +133,13 @@ public void test_the_registry_overall_predicate_firing_works() {
133
133
DataLoader <Object , Object > dlB = newDataLoader (identityBatchLoader );
134
134
DataLoader <Object , Object > dlC = newDataLoader (identityBatchLoader );
135
135
136
- DispatchPredicate predicateOverAllOnThree = new CountingDispatchPredicate (3 );
136
+ DispatchPredicate predicateOnSix = new CountingDispatchPredicate (6 );
137
137
138
138
DataLoaderRegistry registry = DataLoaderRegistry .newRegistry ()
139
139
.register ("a" , dlA , DISPATCH_NEVER )
140
140
.register ("b" , dlB , DISPATCH_NEVER )
141
141
.register ("c" , dlC , DISPATCH_NEVER )
142
- .dispatchPredicate (predicateOverAllOnThree )
142
+ .dispatchPredicate (predicateOnSix )
143
143
.build ();
144
144
145
145
@@ -148,13 +148,18 @@ public void test_the_registry_overall_predicate_firing_works() {
148
148
CompletableFuture <Object > cfC = dlC .load ("C" );
149
149
150
150
int count = registry .dispatchAllWithCount (); // first firing
151
- // none should fire
152
151
assertThat (count , equalTo (0 ));
153
152
assertThat (cfA .isDone (), equalTo (false ));
154
153
assertThat (cfB .isDone (), equalTo (false ));
155
154
assertThat (cfC .isDone (), equalTo (false ));
156
155
157
- count = registry .dispatchAllWithCount (); // second firing but the overall been asked 3 times already
156
+ count = registry .dispatchAllWithCount (); // second firing but the overall been asked 6 times already
157
+ assertThat (count , equalTo (0 ));
158
+ assertThat (cfA .isDone (), equalTo (false ));
159
+ assertThat (cfB .isDone (), equalTo (false ));
160
+ assertThat (cfC .isDone (), equalTo (false ));
161
+
162
+ count = registry .dispatchAllWithCount (); // third firing but the overall been asked 9 times already
158
163
assertThat (count , equalTo (3 ));
159
164
assertThat (cfA .isDone (), equalTo (true ));
160
165
assertThat (cfB .isDone (), equalTo (true ));
0 commit comments