File tree 1 file changed +3
-11
lines changed
src/test/java/com/spotify/reaper/service
1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -24,13 +24,12 @@ public void setUp() throws Exception {
24
24
}
25
25
26
26
@ Test
27
- public void runTest () throws InterruptedException {
27
+ public void noSegmentsTest () throws InterruptedException {
28
28
final int RUN_ID = 1 ;
29
29
final int CF_ID = 1 ;
30
30
final double INTENSITY = 0.5f ;
31
31
final long TIME_CREATION = 41l ;
32
32
final long TIME_START = 42l ;
33
- final long TIME_END = 43l ;
34
33
35
34
// place a dummy repair run into the storage
36
35
DateTimeUtils .setCurrentMillisFixed (TIME_CREATION );
@@ -50,17 +49,10 @@ public void runTest() throws InterruptedException {
50
49
assertNotNull (startTime );
51
50
assertEquals (TIME_START , startTime .getMillis ());
52
51
53
- // end the repair
54
- DateTimeUtils .setCurrentMillisFixed (TIME_END );
55
- RepairRun run = storage .getRepairRun (RUN_ID );
56
- storage .updateRepairRun (run .with ().runState (RepairRun .RunState .RUNNING ).build (RUN_ID ));
57
- RepairRunner .startNewRepairRun (storage , RUN_ID );
58
- Thread .sleep (200 );
59
-
60
- // check if the end time was properly set
52
+ // end time will also be set immediately
61
53
DateTime endTime = storage .getRepairRun (RUN_ID ).getEndTime ();
62
54
assertNotNull (endTime );
63
- assertEquals (TIME_END , endTime .getMillis ());
55
+ assertEquals (TIME_START , endTime .getMillis ());
64
56
}
65
57
66
58
}
You can’t perform that action at this time.
0 commit comments