Helius
2021-05-21 d30d959c8f249c20b39e66dd0c48341a77751d21
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
package com.xcong.excoin;
 
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
public class OtcTest {
 
    @Autowired
    private OtcProducter otcProducter;
 
    @Test
    public void rabbitTest() {
        otcProducter.sendDelayOrderMsg("123456");
 
        while(true){
            try {
                TimeUnit.SECONDS.sleep(1);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
 
        }
    }
}