Skip to content

Commit

Permalink
feat(sdk): kraken-31 - fix sonar cloud issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jaroslawmalekcodete committed Nov 14, 2024
1 parent f1a464d commit 4d5a023
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import java.time.ZonedDateTime;
import java.time.temporal.ChronoUnit;
import java.util.List;
import lombok.SneakyThrows;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort;
Expand Down Expand Up @@ -74,7 +73,7 @@ void givenApiLogSearchParam_whenCreatePushApiActivityLogInfo_thenSaveEvent() {
var result = sut.searchHistory(PushLogSearchRequest.builder().build(), pageRequest);
// then
var logs = result.getData();
assertThat(logs.size()).isGreaterThan(2);
assertThat(logs).hasSizeGreaterThan(2);
verifyIfLogsOrderedByCreatedAtDesc(logs);
}

Expand All @@ -84,11 +83,9 @@ private void verifyIfLogsOrderedByCreatedAtDesc(List<PushApiActivityLogHistory>
}
}

@SneakyThrows
private void givenPushApiActivityLogs() {
var env = environmentService.findAll().get(0);
for (int i = 0; i < 3; i++) {
Thread.sleep(10);
var request = pushApiActivityRequest(env);
sut.createPushApiActivityLogInfo(request, "userId1");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void givenApiLogs_whenPushApiActivityLogToExternalSystem_thenAllLogsSentAndEvent

private void verifyPage0(PushExternalSystemPayload page0, MgmtEventEntity logEvent) {
assertThat(page0.getData().getTotal()).isEqualTo(40);
assertThat(page0.getData().getPage()).isEqualTo(0);
assertThat(page0.getData().getPage()).isZero();
assertThat(page0.getData().getSize()).isEqualTo(30);
assertThat(page0.getData().getData()).hasSize(30);
verifyData(page0, logEvent);
Expand Down

0 comments on commit 4d5a023

Please sign in to comment.