Skip to content

Commit

Permalink
Aospace platform lock fix 1 (#32)
Browse files Browse the repository at this point in the history
* update test units

* update test units
  • Loading branch information
gatsby068 authored Oct 30, 2023
1 parent 443b3fc commit 987c06d
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @author VvV
* @date 2023/8/11
*/
@QuarkusTest
//@QuarkusTest
public class MySQLReentrantReadWriteLockTest {

private static final Logger LOG = Logger.getLogger("app.log");
Expand All @@ -40,7 +40,7 @@ public class MySQLReentrantReadWriteLockTest {
/**
* 测试读锁 加锁和解锁流程
*/
@Test
// @Test
void testReadLock() {
String keyName = "testKey_read";
DistributedReadWriteLock readWriteLock = lockFactory.newLock(keyName, LockType.MySQLReentrantReadWriteLock);
Expand Down Expand Up @@ -69,7 +69,7 @@ void testReadLock() {
/**
* 测试写锁加锁解锁流程
*/
@Test
// @Test
void testWriteLock() {
String keyName = "testKey_write";
DistributedReadWriteLock readWriteLock = lockFactory.newLock(keyName, LockType.MySQLReentrantReadWriteLock);
Expand Down Expand Up @@ -100,7 +100,7 @@ void testWriteLock() {
/**
* 测试读锁并发加锁解锁
*/
@Test
// @Test
void testReadLockConcurrent() throws InterruptedException {
String keyName = "testKey_read_lock_concurrent";

Expand Down Expand Up @@ -148,7 +148,7 @@ void testReadLockConcurrent() throws InterruptedException {
/**
* 测试写锁并发加锁解锁
*/
@Test
// @Test
void testWriteLockConcurrent() throws InterruptedException {
String keyName = "testKey_write_lock_concurrent";

Expand Down Expand Up @@ -196,7 +196,7 @@ void testWriteLockConcurrent() throws InterruptedException {
/**
* 测试读读是否共享
*/
@Test
// @Test
void testReadReadSharing() throws JsonProcessingException {
String keyName = "test_read_sharing";
DistributedReadWriteLock readWriteLock = lockFactory.newLock(keyName, LockType.MySQLReentrantReadWriteLock);
Expand All @@ -217,7 +217,7 @@ void testReadReadSharing() throws JsonProcessingException {
/**
* 测试读锁重入
*/
@Test
// @Test
void testReadReentrant() throws JsonProcessingException {
String keyName = "test_read_reentrant";
DistributedReadWriteLock readWriteLock = lockFactory.newLock(keyName, LockType.MySQLReentrantReadWriteLock);
Expand All @@ -235,7 +235,7 @@ void testReadReentrant() throws JsonProcessingException {
/**
* 测试写锁重入
*/
@Test
// @Test
void testWriteReentrant() throws JsonProcessingException {
String keyName = "test_write_reentrant";
DistributedReadWriteLock readWriteLock = lockFactory.newLock(keyName, LockType.MySQLReentrantReadWriteLock);
Expand All @@ -253,7 +253,7 @@ void testWriteReentrant() throws JsonProcessingException {
/**
* 测试读写互斥
*/
@Test
// @Test
void testReadWriteMutex() {
String keyName = "test_read_write_mutex";
DistributedReadWriteLock readWriteLock = lockFactory.newLock(keyName, LockType.MySQLReentrantReadWriteLock);
Expand All @@ -273,7 +273,7 @@ void testReadWriteMutex() {
/**
* 测试写写互斥
*/
@Test
// @Test
void testWriteWriteMutex() {
String keyName = "test_write_write_mutex";
DistributedReadWriteLock readWriteLock = lockFactory.newLock(keyName, LockType.MySQLReentrantReadWriteLock);
Expand All @@ -292,7 +292,7 @@ void testWriteWriteMutex() {
/**
* 测试多线程并发的读写锁
*/
@Test
// @Test
void testConcurrentReadWriteLock() throws InterruptedException, JsonProcessingException {
String keyName = "test_concurrent_read_write";
DistributedReadWriteLock readWriteLock = lockFactory.newLock(keyName, LockType.MySQLReentrantReadWriteLock);
Expand Down Expand Up @@ -377,7 +377,7 @@ void testConcurrentReadWriteLock() throws InterruptedException, JsonProcessingEx
/**
* 测试锁降级
*/
@Test
// @Test
void testLockDegradation() {
String keyName = "testKey_lock_degradation";
DistributedReadWriteLock readWriteLock = lockFactory.newLock(keyName, LockType.MySQLReentrantReadWriteLock);
Expand Down

0 comments on commit 987c06d

Please sign in to comment.