-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from crossoverJie/fix-client-unit-test
[test] fix client unit test
- Loading branch information
Showing
13 changed files
with
90 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
23 changes: 23 additions & 0 deletions
23
cim-client/src/test/java/com/crossoverjie/cim/client/service/impl/EchoServiceImplTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.crossoverjie.cim.client.service.impl; | ||
|
||
import com.crossoverjie.cim.client.CIMClientApplication; | ||
import com.crossoverjie.cim.client.service.EchoService; | ||
import jakarta.annotation.Resource; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.test.context.junit4.SpringRunner; | ||
|
||
|
||
@SpringBootTest(classes = CIMClientApplication.class) | ||
@RunWith(SpringRunner.class) | ||
public class EchoServiceImplTest { | ||
|
||
@Resource | ||
private EchoService echoService; | ||
|
||
@Test | ||
public void echo(){ | ||
echoService.echo("test"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
spring: | ||
application: | ||
name: cim-client | ||
main: | ||
# this will not be used to create real spring context, because don't need this context in test case. | ||
web-application-type: none | ||
|
||
# web port | ||
server: | ||
port: 8082 | ||
|
||
logging: | ||
level: | ||
root: error | ||
|
||
# enable swagger | ||
springdoc: | ||
swagger-ui: | ||
enabled: true | ||
|
||
# log path | ||
cim: | ||
msg: | ||
logger: | ||
path: /opt/logs/cim/ | ||
route: | ||
url: http://localhost:8083 # route url suggested that this is Nginx address | ||
user: # cim userId and userName | ||
id: 1722343979085 | ||
userName: zhangsan | ||
callback: | ||
thread: | ||
queue: | ||
size: 2 | ||
pool: | ||
size: 2 | ||
heartbeat: | ||
time: 60 # cim heartbeat time (seconds) | ||
reconnect: | ||
count: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,7 +82,7 @@ public void sort() { | |
if (o1.key > o2.key) { | ||
return 1; | ||
} else { | ||
return -1; | ||
return 0; | ||
} | ||
}); | ||
} | ||
|