diff --git a/log-manager/src/test/java/producer/ProducerTest.java b/log-manager/src/test/java/producer/ProducerTest.java index 9aa0fb57d3fa203934e5e751f8a553e99050d069..16c47b9058dbff7fc66955dcbac0dc06a7cf9e49 100644 --- a/log-manager/src/test/java/producer/ProducerTest.java +++ b/log-manager/src/test/java/producer/ProducerTest.java @@ -1,43 +1,43 @@ -package producer; - - -import cn.hutool.core.util.IdUtil; -import com.mortals.xhx.ManagerApplication; -import com.mortals.xhx.base.system.message.MessageProducer; -import com.mortals.xhx.module.biz.model.BizLogEntity; -import lombok.extern.slf4j.Slf4j; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; - -import java.util.Date; -import java.util.concurrent.CountDownLatch; - -@RunWith(SpringRunner.class) -@SpringBootTest(classes = ManagerApplication.class) -@Slf4j -public class ProducerTest { - - @Autowired - private MessageProducer producer; - - @Test - public void testSyncSend() { - -//for (int i) - while (true){ - BizLogEntity bizLogEntity = new BizLogEntity(); - bizLogEntity.initAttrValue(); - bizLogEntity.setTraceID(IdUtil.fastSimpleUUID()); - bizLogEntity.setLogTime(new Date()); - producer.syncBizSend(bizLogEntity); - log.info("[testSyncSend][鍙戦€佺紪鍙凤細[{}] 鍙戦€佹垚鍔焆", bizLogEntity.getTraceID()); - } - - } - -} +//package producer; +// +// +//import cn.hutool.core.util.IdUtil; +//import com.mortals.xhx.ManagerApplication; +//import com.mortals.xhx.base.system.message.MessageProducer; +//import com.mortals.xhx.module.biz.model.BizLogEntity; +//import lombok.extern.slf4j.Slf4j; +//import org.junit.Test; +//import org.junit.runner.RunWith; +//import org.slf4j.Logger; +//import org.slf4j.LoggerFactory; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.boot.test.context.SpringBootTest; +//import org.springframework.test.context.junit4.SpringRunner; +// +//import java.util.Date; +//import java.util.concurrent.CountDownLatch; +// +//@RunWith(SpringRunner.class) +//@SpringBootTest(classes = ManagerApplication.class) +//@Slf4j +//public class ProducerTest { +// +// @Autowired +// private MessageProducer producer; +// +// @Test +// public void testSyncSend() { +// +////for (int i) +// while (true){ +// BizLogEntity bizLogEntity = new BizLogEntity(); +// bizLogEntity.initAttrValue(); +// bizLogEntity.setTraceID(IdUtil.fastSimpleUUID()); +// bizLogEntity.setLogTime(new Date()); +// producer.syncBizSend(bizLogEntity); +// log.info("[testSyncSend][鍙戦€佺紪鍙凤細[{}] 鍙戦€佹垚鍔焆", bizLogEntity.getTraceID()); +// } +// +// } +// +//}