src/main/resources/application-test.yml | ●●●●● patch | view | raw | blame | history | |
src/main/resources/application.yml | ●●●●● patch | view | raw | blame | history | |
src/test/java/com/xcong/excoin/WholeTest.java | ●●●●● patch | view | raw | blame | history |
src/main/resources/application-test.yml
@@ -94,7 +94,7 @@ debug: false redis_expire: 3000 kline-update-job: false newest-price-update-job: false newest-price-update-job: true #日线 该任务不能与最新价处于同一个服务器 day-line: true other-job: true src/main/resources/application.yml
@@ -5,7 +5,7 @@ spring: profiles: active: dev active: test datasource: url: jdbc:mysql://rm-bp151tw8er79ig9kb5o.mysql.rds.aliyuncs.com:3306/db_hibit?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2b8 username: ctcoin_data src/test/java/com/xcong/excoin/WholeTest.java
@@ -13,8 +13,10 @@ import com.xcong.excoin.modules.member.entity.MemberEntity; import com.xcong.excoin.modules.member.entity.MemberWalletContractEntity; import com.xcong.excoin.rabbit.pricequeue.OrderModel; import com.xcong.excoin.rabbit.pricequeue.WebsocketPriceService; import com.xcong.excoin.rabbit.producer.OrderProducer; import com.xcong.excoin.utils.CalculateUtil; import com.xcong.excoin.utils.CoinTypeConvert; import com.xcong.excoin.utils.RedisUtils; import com.xcong.excoin.utils.ThreadPoolUtils; import org.junit.jupiter.api.Test; @@ -141,4 +143,17 @@ } } @Resource WebsocketPriceService websocketPriceService; @Test public void priceTest() { String symbol = "BTC/USDT"; String price = "13095.00"; // TODO 测试环境关闭这个插入redis redisUtils.set(CoinTypeConvert.convertToKey(symbol), price); // 比较 websocketPriceService.comparePriceAsc(symbol, price); websocketPriceService.comparePriceDesc(symbol, price); } }