-
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.
- Loading branch information
1 parent
b0386e2
commit 1b03e3a
Showing
1 changed file
with
22 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
|
||
```java | ||
var auth1 = ClientConfigurationData.Auth.builder() | ||
.userId(id) | ||
.userName(cj) | ||
.build(); | ||
|
||
Client client1 = Client.builder() | ||
.auth(auth1) | ||
.routeUrl(routeUrl) | ||
.build(); | ||
|
||
ClientState.State state = client1.getState(); | ||
Awaitility.await().atMost(10, TimeUnit.SECONDS) | ||
.untilAsserted(() -> Assertions.assertEquals(ClientState.State.Ready, state)); | ||
Optional<CIMServerResVO> serverInfo = client1.getServerInfo(); | ||
Assertions.assertTrue(serverInfo.isPresent()); | ||
|
||
// send msg | ||
String msg = "hello"; | ||
client1.sendGroup(msg); | ||
|
||
// get oline user | ||
Set<CIMUserInfo> onlineUser = client1.getOnlineUser(); | ||
var auth1 = ClientConfigurationData.Auth.builder() | ||
.userId(id) | ||
.userName(cj) | ||
.build(); | ||
Client client1 = Client.builder() | ||
.auth(auth1) | ||
.routeUrl(routeUrl) | ||
.build(); | ||
ClientState.State state = client1.getState(); | ||
Awaitility.await().atMost(10, TimeUnit.SECONDS) | ||
.untilAsserted(() -> Assertions.assertEquals(ClientState.State.Ready, state)); | ||
Optional<CIMServerResVO> serverInfo = client1.getServerInfo(); | ||
Assertions.assertTrue(serverInfo.isPresent()); | ||
// send msg | ||
String msg = "hello"; | ||
client1.sendGroup(msg); | ||
// get oline user | ||
Set<CIMUserInfo> onlineUser = client1.getOnlineUser(); | ||
``` |