Skip to content

Commit

Permalink
Merge pull request #16 from Onlineberatung/develop
Browse files Browse the repository at this point in the history
[pull] develop from Onlineberatung:develop
  • Loading branch information
tkuzynow authored Nov 17, 2022
2 parents bba54e6 + e3a15be commit 0b8bab3
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
30 changes: 30 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,31 @@
<version>${spring-security.version}</version>
</dependency>

<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.3.0</version>
</dependency>

<dependency>
<groupId>com.github.jknack</groupId>
<artifactId>handlebars</artifactId>
<version>4.3.1</version>
</dependency>

<dependency>
<groupId>org.sonatype.plexus</groupId>
<artifactId>plexus-build-api</artifactId>
<version>0.0.7</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- OpenApi/Swagger dependencies -->
<dependency>
<groupId>org.openapitools</groupId>
Expand Down Expand Up @@ -114,6 +139,11 @@
<artifactId>commons-lang3</artifactId>
<version>3.11</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.10.0</version>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,11 @@ void subscribe_Should_subscribeUser() throws Exception {
var stompSession = performConnect(FIRST_VALID_USER);
final Subscription subscription = performSubscribe(stompSession);


assertThat(this.socketUserRegistry.retrieveAllUsers(), hasSize(1));
WebSocketUserSession registeredUser = this.socketUserRegistry.retrieveAllUsers().get(0);
await()
.atMost(MESSAGE_TIMEOUT, SECONDS)
.atMost(15, SECONDS)
.until(registeredUser::getSubscriptionId, notNullValue());

assertThat(registeredUser, notNullValue());
Expand All @@ -110,11 +111,11 @@ void subscribe_Should_subscribeUser() throws Exception {
assertThat(registeredUser.getSubscriptionId(), notNullValue());
assertThat(subscription.getSubscriptionHeaders().get("destination"),
contains(SUBSCRIPTION_ENDPOINT));
performDisconnect(stompSession);
}

@Test
void disconnect_Should_removeUserFromRegistry() throws Exception {

var stompSession = performConnect(FIRST_VALID_USER);

assertThat(this.socketUserRegistry.retrieveAllUsers(), hasSize(1));
Expand Down Expand Up @@ -187,7 +188,7 @@ void sendLiveEvent_Should_sendVideoDenyRequestMessageEventToUser_When_userIsSubs
.andExpect(status().isOk());

await()
.atMost(MESSAGE_TIMEOUT, SECONDS)
.atMost(15, SECONDS)
.until(receivedMessages::size, is(1));
var resultMessage = receivedMessages.iterator().next();
assertThat(resultMessage, notNullValue());
Expand Down

0 comments on commit 0b8bab3

Please sign in to comment.