//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("*****************");
|
// }
|
//}
|