Browse Source

Merge pull request #9651 from thingsboard/fix/notifications-count-test

Improve flaky test
pull/9658/head
Andrew Shvayka 3 years ago
committed by GitHub
parent
commit
034dc182e2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      application/src/test/java/org/thingsboard/server/service/notification/NotificationApiTest.java

4
application/src/test/java/org/thingsboard/server/service/notification/NotificationApiTest.java

@ -113,15 +113,13 @@ public class NotificationApiTest extends AbstractNotificationApiTest {
@Test
public void testSubscribingToUnreadNotificationsCount() {
wsClient.subscribeForUnreadNotificationsCount().waitForReply(true);
NotificationTarget notificationTarget = createNotificationTarget(customerUserId);
String notificationText1 = "Notification 1";
submitNotificationRequest(notificationTarget.getId(), notificationText1);
String notificationText2 = "Notification 2";
submitNotificationRequest(notificationTarget.getId(), notificationText2);
wsClient.subscribeForUnreadNotificationsCount();
wsClient.waitForReply(true);
await().atMost(2, TimeUnit.SECONDS)
.until(() -> wsClient.getLastCountUpdate().getTotalUnreadCount() == 2);
}

Loading…
Cancel
Save