Helius
2021-06-01 25aec7899b8ab3d483bbfd6d7580c6966318ee7f
src/test/java/com/xcong/excoin/OtcTest.java
@@ -1,10 +1,13 @@
package com.xcong.excoin;
import com.xcong.excoin.quartz.job.OtcOrderJob;
import com.xcong.excoin.rabbit.producer.OtcProducter;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import java.util.concurrent.TimeUnit;
@Slf4j
@SpringBootTest
@@ -15,6 +18,28 @@
    @Test
    public void rabbitTest() {
        otcProducter.sendMarketBussinessMsg("123456");
        otcProducter.sendDelayOrderMsg("123456");
        while(true){
            try {
                TimeUnit.SECONDS.sleep(1);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
    @Autowired
    private OtcOrderJob otcOrderJob;
    @Test
    public void jobTest() {
        otcOrderJob.marketBussinessJob();
    }
    @Test
    public void mbProducterTest() {
        otcProducter.sendMarketBussinessMsg(11L, 3);
    }
}