Pu Zhibing
昨天 c3b7673c16d026e57f8759b4cee99a42bf3c57f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//package com.stylefeng.guns;
//
//import com.stylefeng.guns.modular.system.util.RedisUtil;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.test.context.junit4.SpringRunner;
//
//import javax.annotation.Resource;
//
//
//@RunWith(SpringRunner.class)
//@SpringBootTest
//public class GunsApplicationTest {
//
//    @Resource
//    private RedisUtil redisUtil;
//
//    @Test
//    public void test(){
//        boolean lock = redisUtil.lock("key_test", 10, 30);
//        if(lock){
//            System.err.println("-----------------");
//        }
////        redisUtil.unlock("key_test");
//        lock = redisUtil.lock("key_test", 10, 30);
//        if(lock){
//            System.err.println("!!!!!!!!!!!!!!!!!!!!");
//            return;
//        }
//        System.err.println("*****************");
//    }
//}