File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
main/java/org/neo4j/gds/core/utils/progress/tasks
test/java/org/neo4j/gds/core/utils/progress/tasks Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public void finish() {
39
39
40
40
// This task should now be considered to have 100% progress.
41
41
if (volume == UNKNOWN_VOLUME ) {
42
- volume = 0 ;
42
+ volume = currentProgress . longValue () ;
43
43
}
44
44
currentProgress .add (volume - currentProgress .longValue ());
45
45
}
Original file line number Diff line number Diff line change @@ -221,10 +221,11 @@ void shouldSetProgressWhenFinishingTask() {
221
221
task .start ();
222
222
var leaf1 = task .nextSubtask ();
223
223
leaf1 .start ();
224
- leaf1 .setVolume (22L );
224
+ leaf1 .logProgress (22L );
225
225
leaf1 .finish ();
226
226
227
227
assertThat (leaf1 .getProgress ().progress ()).isEqualTo (22L );
228
+ assertThat (leaf1 .getProgress ().volume ()).isEqualTo (22L );
228
229
assertThat (task .getProgress ().volume ()).isEqualTo (Task .UNKNOWN_VOLUME );
229
230
230
231
var leaf2 = task .nextSubtask ();
@@ -233,6 +234,7 @@ void shouldSetProgressWhenFinishingTask() {
233
234
leaf2 .finish ();
234
235
235
236
assertThat (leaf2 .getProgress ().progress ()).isEqualTo (20L );
237
+ assertThat (leaf2 .getProgress ().volume ()).isEqualTo (20L );
236
238
assertThat (task .getProgress ().volume ()).isEqualTo (Task .UNKNOWN_VOLUME );
237
239
238
240
task .finish ();
You can’t perform that action at this time.
0 commit comments