20
20
21
21
import static org .junit .jupiter .api .Assertions .assertEquals ;
22
22
23
+ import java .time .Duration ;
23
24
import java .util .HashSet ;
24
25
import java .util .Set ;
25
- import java .util .concurrent .TimeUnit ;
26
26
27
27
import org .apache .accumulo .core .fate .AgeOffStore .TimeSource ;
28
28
import org .apache .accumulo .core .fate .ReadOnlyTStore .TStatus ;
@@ -53,23 +53,23 @@ public void testBasic() throws InterruptedException, KeeperException {
53
53
long txid1 = aoStore .create ();
54
54
aoStore .reserve (txid1 );
55
55
aoStore .setStatus (txid1 , TStatus .IN_PROGRESS );
56
- aoStore .unreserve (txid1 , 0 , TimeUnit . MILLISECONDS );
56
+ aoStore .unreserve (txid1 , Duration . ZERO );
57
57
58
58
aoStore .ageOff ();
59
59
60
60
long txid2 = aoStore .create ();
61
61
aoStore .reserve (txid2 );
62
62
aoStore .setStatus (txid2 , TStatus .IN_PROGRESS );
63
63
aoStore .setStatus (txid2 , TStatus .FAILED );
64
- aoStore .unreserve (txid2 , 0 , TimeUnit . MILLISECONDS );
64
+ aoStore .unreserve (txid2 , Duration . ZERO );
65
65
66
66
tts .time = 6 ;
67
67
68
68
long txid3 = aoStore .create ();
69
69
aoStore .reserve (txid3 );
70
70
aoStore .setStatus (txid3 , TStatus .IN_PROGRESS );
71
71
aoStore .setStatus (txid3 , TStatus .SUCCESSFUL );
72
- aoStore .unreserve (txid3 , 0 , TimeUnit . MILLISECONDS );
72
+ aoStore .unreserve (txid3 , Duration . ZERO );
73
73
74
74
Long txid4 = aoStore .create ();
75
75
@@ -102,19 +102,19 @@ public void testNonEmpty() throws InterruptedException, KeeperException {
102
102
long txid1 = testStore .create ();
103
103
testStore .reserve (txid1 );
104
104
testStore .setStatus (txid1 , TStatus .IN_PROGRESS );
105
- testStore .unreserve (txid1 , 0 , TimeUnit . MILLISECONDS );
105
+ testStore .unreserve (txid1 , Duration . ZERO );
106
106
107
107
long txid2 = testStore .create ();
108
108
testStore .reserve (txid2 );
109
109
testStore .setStatus (txid2 , TStatus .IN_PROGRESS );
110
110
testStore .setStatus (txid2 , TStatus .FAILED );
111
- testStore .unreserve (txid2 , 0 , TimeUnit . MILLISECONDS );
111
+ testStore .unreserve (txid2 , Duration . ZERO );
112
112
113
113
long txid3 = testStore .create ();
114
114
testStore .reserve (txid3 );
115
115
testStore .setStatus (txid3 , TStatus .IN_PROGRESS );
116
116
testStore .setStatus (txid3 , TStatus .SUCCESSFUL );
117
- testStore .unreserve (txid3 , 0 , TimeUnit . MILLISECONDS );
117
+ testStore .unreserve (txid3 , Duration . ZERO );
118
118
119
119
Long txid4 = testStore .create ();
120
120
@@ -137,7 +137,7 @@ public void testNonEmpty() throws InterruptedException, KeeperException {
137
137
138
138
aoStore .reserve (txid1 );
139
139
aoStore .setStatus (txid1 , TStatus .FAILED_IN_PROGRESS );
140
- aoStore .unreserve (txid1 , 0 , TimeUnit . MILLISECONDS );
140
+ aoStore .unreserve (txid1 , Duration . ZERO );
141
141
142
142
tts .time = 30 ;
143
143
@@ -148,7 +148,7 @@ public void testNonEmpty() throws InterruptedException, KeeperException {
148
148
149
149
aoStore .reserve (txid1 );
150
150
aoStore .setStatus (txid1 , TStatus .FAILED );
151
- aoStore .unreserve (txid1 , 0 , TimeUnit . MILLISECONDS );
151
+ aoStore .unreserve (txid1 , Duration . ZERO );
152
152
153
153
aoStore .ageOff ();
154
154
0 commit comments