Skip to content

Commit 880ac6a

Browse files
committed
resolve test failure problems
1 parent 4f422b8 commit 880ac6a

File tree

6 files changed

+35
-21
lines changed

6 files changed

+35
-21
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
package site.hellooo.distributedlock.common;
22

3+
import org.junit.Test;
4+
35
public class ArgChecker {
6+
@Test
7+
public void testConstructor() {
8+
}
49
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
package site.hellooo.distributedlock.common;
22

3+
import org.junit.Test;
4+
35
public class NetworkUtilsTest {
6+
@Test
7+
public void testConstructor() {
8+
}
49
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
package site.hellooo.distributedlock.common;
22

3+
import org.junit.Test;
4+
35
public class ProcessUtilsTest {
6+
@Test
7+
public void testConstructor() {
8+
}
49
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
package site.hellooo.distributedlock.common;
22

3+
import org.junit.Test;
4+
35
public class StringUtilsTest {
6+
@Test
7+
public void testConstructor() {
8+
}
49
}

src/test/java/site/hellooo/distributedlock/impl/ReentrantDistributedLockTest.java

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,45 @@
11
package site.hellooo.distributedlock.impl;
22

3+
34
import org.junit.Test;
45

5-
class ReentrantDistributedLockTest {
6+
public class ReentrantDistributedLockTest {
67
@Test
7-
void testConstructor() {
8-
// case1: after constructor method called:
9-
// - the result of constructed object should not be null
10-
// - object field: lockOptions, lockTarget, lockHandler should be set to the argument ref
11-
// - object field: lockContext, lockCallback should not be null
12-
// case2: after case 1 executed, field of object.lockContext:
13-
// - .lockTarget(object.lockContext.lockTarget): should be equal to object.lockTarget
14-
// - .lockOptions(object.lockContext.lockOptions): should be equal to object.lockOptions
15-
// - .holdingThread(object.lockContext.holdingThread): should not be null, and has an empty value
16-
// - .holdingLockState(object.lockContext.holdingLockState): should not be null, and has an empty value
17-
// - .lockHandler(object.lockContext.lockHandler): should be equal to object.lockHandler
18-
// - .lockCallback(object.lockContext.lockCallback): should be equal to object.lockCallback
8+
public void testConstructor() {
199
}
2010

2111
@Test
22-
void testAddWaiter() {
12+
public void testAddWaiter() {
2313

2414
}
2515

2616
@Test
27-
void testEnqueue() {
17+
public void testEnqueue() {
2818

2919
}
3020

3121
@Test
32-
void testAcquireQueued() {
22+
public void testAcquireQueued() {
3323

3424
}
3525

3626
@Test
37-
void testUnparkQueueHead() {
27+
public void testUnparkQueueHead() {
3828

3929
}
4030

4131
@Test
42-
void testLock() {
32+
public void testLock() {
4333

4434
}
4535

4636
@Test
47-
void testTryLock() {
37+
public void testTryLock() {
4838

4939
}
5040

5141
@Test
52-
void testUnLock() {
42+
public void testUnLock() {
5343

5444
}
5545

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
package site.hellooo.distributedlock.impl.redis;
22

3-
public class RemotingLeaseThreadTest {
3+
import org.junit.Test;
44

5+
public class RemotingLeaseThreadTest {
6+
@Test
7+
public void testConstructor() {
8+
}
59
}

0 commit comments

Comments
 (0)