Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
log-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
log-platform
Commits
f881b38e
Commit
f881b38e
authored
Aug 25, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
异常日志前端展示添加
parent
ee4d021a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
43 deletions
+43
-43
log-manager/src/test/java/producer/ProducerTest.java
log-manager/src/test/java/producer/ProducerTest.java
+43
-43
No files found.
log-manager/src/test/java/producer/ProducerTest.java
View file @
f881b38e
package
producer
;
//
package producer;
//
//
import
cn.hutool.core.util.IdUtil
;
//
import cn.hutool.core.util.IdUtil;
import
com.mortals.xhx.ManagerApplication
;
//
import com.mortals.xhx.ManagerApplication;
import
com.mortals.xhx.base.system.message.MessageProducer
;
//
import com.mortals.xhx.base.system.message.MessageProducer;
import
com.mortals.xhx.module.biz.model.BizLogEntity
;
//
import com.mortals.xhx.module.biz.model.BizLogEntity;
import
lombok.extern.slf4j.Slf4j
;
//
import lombok.extern.slf4j.Slf4j;
import
org.junit.Test
;
//
import org.junit.Test;
import
org.junit.runner.RunWith
;
//
import org.junit.runner.RunWith;
import
org.slf4j.Logger
;
//
import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
//
import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
//
import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.boot.test.context.SpringBootTest
;
//
import org.springframework.boot.test.context.SpringBootTest;
import
org.springframework.test.context.junit4.SpringRunner
;
//
import org.springframework.test.context.junit4.SpringRunner;
//
import
java.util.Date
;
//
import java.util.Date;
import
java.util.concurrent.CountDownLatch
;
//
import java.util.concurrent.CountDownLatch;
//
@RunWith
(
SpringRunner
.
class
)
//
@RunWith(SpringRunner.class)
@SpringBootTest
(
classes
=
ManagerApplication
.
class
)
//
@SpringBootTest(classes = ManagerApplication.class)
@Slf4j
//
@Slf4j
public
class
ProducerTest
{
//
public class ProducerTest {
//
@Autowired
//
@Autowired
private
MessageProducer
producer
;
//
private MessageProducer producer;
//
@Test
//
@Test
public
void
testSyncSend
()
{
//
public void testSyncSend() {
//
//for (int i)
//
//
for (int i)
while
(
true
){
//
while (true){
BizLogEntity
bizLogEntity
=
new
BizLogEntity
();
//
BizLogEntity bizLogEntity = new BizLogEntity();
bizLogEntity
.
initAttrValue
();
//
bizLogEntity.initAttrValue();
bizLogEntity
.
setTraceID
(
IdUtil
.
fastSimpleUUID
());
//
bizLogEntity.setTraceID(IdUtil.fastSimpleUUID());
bizLogEntity
.
setLogTime
(
new
Date
());
//
bizLogEntity.setLogTime(new Date());
producer
.
syncBizSend
(
bizLogEntity
);
//
producer.syncBizSend(bizLogEntity);
log
.
info
(
"[testSyncSend][发送编号:[{}] 发送成功]"
,
bizLogEntity
.
getTraceID
());
//
log.info("[testSyncSend][发送编号:[{}] 发送成功]", bizLogEntity.getTraceID());
}
//
}
//
}
//
}
//
}
//
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment