Pu Zhibing
1 天以前 c3b7673c16d026e57f8759b4cee99a42bf3c57f2
UserZYTravel/guns-admin/src/test/java/com/stylefeng/guns/GunsApplicationTest.java
@@ -3,28 +3,31 @@
//import com.stylefeng.guns.modular.system.util.RedisUtil;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.data.geo.GeoResult;
//import org.springframework.data.redis.connection.RedisGeoCommands;
//import org.springframework.test.context.junit4.SpringRunner;
//
//import java.util.List;
//import javax.annotation.Resource;
//
// * @author zhibing.pu
// * @Date 2024/9/24 9:24
// */
//
//@RunWith(SpringRunner.class)
//@SpringBootTest
//public class GunsApplicationTest {
//
//   @Autowired
//    @Resource
//   private RedisUtil redisUtil;
//
//
//   @Test
//   public void test(){
//      List<GeoResult<RedisGeoCommands.GeoLocation<String>>> driverPosition = redisUtil.getNearGeo("DRIVER_POSITION", 104.5615D, 30.456275D, 50000D);
//      System.err.println(driverPosition);
//        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("*****************");
//   }
//}