55
55
*/
56
56
@ SpringJUnitConfig
57
57
@ DirtiesContext
58
- public class DynamoDbLockRegistryTests implements LocalstackContainerTest {
58
+ class DynamoDbLockRegistryTests implements LocalstackContainerTest {
59
59
60
60
private static DynamoDbAsyncClient DYNAMO_DB ;
61
61
@@ -98,7 +98,7 @@ void clear() throws InterruptedException {
98
98
99
99
@ Test
100
100
@ SuppressWarnings ("unchecked" )
101
- void testLock () {
101
+ void lock () {
102
102
for (int i = 0 ; i < 10 ; i ++) {
103
103
Lock lock = this .dynamoDbLockRegistry .obtain ("foo" );
104
104
lock .lock ();
@@ -113,7 +113,7 @@ void testLock() {
113
113
114
114
@ Test
115
115
@ SuppressWarnings ("unchecked" )
116
- void testLockInterruptibly () throws Exception {
116
+ void lockInterruptibly () throws Exception {
117
117
for (int i = 0 ; i < 10 ; i ++) {
118
118
Lock lock = this .dynamoDbLockRegistry .obtain ("foo" );
119
119
lock .lockInterruptibly ();
@@ -127,7 +127,7 @@ void testLockInterruptibly() throws Exception {
127
127
}
128
128
129
129
@ Test
130
- void testReentrantLock () {
130
+ void reentrantLock () {
131
131
for (int i = 0 ; i < 10 ; i ++) {
132
132
Lock lock1 = this .dynamoDbLockRegistry .obtain ("foo" );
133
133
lock1 .lock ();
@@ -144,7 +144,7 @@ void testReentrantLock() {
144
144
}
145
145
146
146
@ Test
147
- void testReentrantLockInterruptibly () throws Exception {
147
+ void reentrantLockInterruptibly () throws Exception {
148
148
for (int i = 0 ; i < 10 ; i ++) {
149
149
Lock lock1 = this .dynamoDbLockRegistry .obtain ("foo" );
150
150
lock1 .lockInterruptibly ();
@@ -161,7 +161,7 @@ void testReentrantLockInterruptibly() throws Exception {
161
161
}
162
162
163
163
@ Test
164
- void testTwoLocks () throws Exception {
164
+ void twoLocks () throws Exception {
165
165
for (int i = 0 ; i < 10 ; i ++) {
166
166
Lock lock1 = this .dynamoDbLockRegistry .obtain ("foo" );
167
167
lock1 .lockInterruptibly ();
@@ -178,7 +178,7 @@ void testTwoLocks() throws Exception {
178
178
}
179
179
180
180
@ Test
181
- void testTwoThreadsSecondFailsToGetLock () throws Exception {
181
+ void twoThreadsSecondFailsToGetLock () throws Exception {
182
182
final Lock lock1 = this .dynamoDbLockRegistry .obtain ("foo" );
183
183
lock1 .lockInterruptibly ();
184
184
final AtomicBoolean locked = new AtomicBoolean ();
@@ -212,7 +212,7 @@ void testTwoThreadsSecondFailsToGetLock() throws Exception {
212
212
}
213
213
214
214
@ Test
215
- void testTwoThreads () throws Exception {
215
+ void twoThreads () throws Exception {
216
216
final Lock lock1 = this .dynamoDbLockRegistry .obtain ("foo" );
217
217
final AtomicBoolean locked = new AtomicBoolean ();
218
218
final CountDownLatch latch1 = new CountDownLatch (1 );
@@ -254,7 +254,7 @@ void testTwoThreads() throws Exception {
254
254
}
255
255
256
256
@ Test
257
- void testTwoThreadsDifferentRegistries () throws Exception {
257
+ void twoThreadsDifferentRegistries () throws Exception {
258
258
DynamoDbLockRepository dynamoDbLockRepository = new DynamoDbLockRepository (DYNAMO_DB );
259
259
dynamoDbLockRepository .setLeaseDuration (Duration .ofSeconds (10 ));
260
260
dynamoDbLockRepository .afterPropertiesSet ();
@@ -299,7 +299,7 @@ void testTwoThreadsDifferentRegistries() throws Exception {
299
299
}
300
300
301
301
@ Test
302
- void testTwoThreadsWrongOneUnlocks () throws Exception {
302
+ void twoThreadsWrongOneUnlocks () throws Exception {
303
303
final Lock lock = this .dynamoDbLockRegistry .obtain ("foo" );
304
304
lock .lockInterruptibly ();
305
305
final AtomicBoolean locked = new AtomicBoolean ();
@@ -343,7 +343,7 @@ void abandonedLock() throws Exception {
343
343
}
344
344
345
345
@ Test
346
- public void testLockRenew () {
346
+ void lockRenew () {
347
347
final Lock lock = this .dynamoDbLockRegistry .obtain ("foo" );
348
348
349
349
assertThat (lock .tryLock ()).isTrue ();
0 commit comments