Skip to content

Commit

Permalink
Changed for loop inside "DatastoreSteps.java" and relative refactorin…
Browse files Browse the repository at this point in the history
…g in tests using it
  • Loading branch information
MDeLuise authored and Coduz committed Aug 4, 2021
1 parent 8ed3fff commit 58d9c36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ Feature: Datastore tests
And I set the database to device timestamp indexing
When I prepare a number of messages in the specified ranges and remember the list as "TestMessages"
| clientId | topic | count | startDate | endDate |
| test-client-1 | delete/by/date/test | 3 | 2018-10-01T12:00:00.000Z | 2018-12-31T12:00:00.000Z |
| test-client-1 | delete/by/date/test | 4 | 2018-10-01T12:00:00.000Z | 2018-12-31T12:00:00.000Z |
Then I store the messages from list "TestMessages" and remember the IDs as "StoredMessageIDs"
And I refresh all indices
When I query for the current account messages with limit 1 and offset 0 and store them as "MessageInfo"
Expand All @@ -1261,7 +1261,7 @@ Feature: Datastore tests
And I set the database to device timestamp indexing
When I prepare a number of messages in the specified ranges and remember the list as "TestMessages"
| clientId | topic | count | startDate | endDate |
| test-client-1 | delete/by/date/test | 3 | 2018-10-01T12:00:00.000Z | 2018-12-31T12:00:00.000Z |
| test-client-1 | delete/by/date/test | 4 | 2018-10-01T12:00:00.000Z | 2018-12-31T12:00:00.000Z |
Then I store the messages from list "TestMessages" and remember the IDs as "StoredMessageIDs"
And I refresh all indices
When I query for the current account messages with limit 4 and offset 0 and store them as "MessageInfo"
Expand All @@ -1277,7 +1277,7 @@ Feature: Datastore tests
And I set the database to device timestamp indexing
When I prepare a number of messages in the specified ranges and remember the list as "TestMessages"
| clientId | topic | count | startDate | endDate |
| test-client-1 | delete/by/date/test | 3 | 2018-10-01T12:00:00.000Z | 2018-12-31T12:00:00.000Z |
| test-client-1 | delete/by/date/test | 4 | 2018-10-01T12:00:00.000Z | 2018-12-31T12:00:00.000Z |
Then I store the messages from list "TestMessages" and remember the IDs as "StoredMessageIDs"
And I refresh all indices
When I query for the current account messages with limit 1 and offset 2 and store them as "MessageInfo"
Expand All @@ -1293,7 +1293,7 @@ Feature: Datastore tests
And I set the database to device timestamp indexing
When I prepare a number of messages in the specified ranges and remember the list as "TestMessages"
| clientId | topic | count | startDate | endDate |
| test-client-1 | delete/by/date/test | 3 | 2018-10-01T12:00:00.000Z | 2018-12-31T12:00:00.000Z |
| test-client-1 | delete/by/date/test | 4 | 2018-10-01T12:00:00.000Z | 2018-12-31T12:00:00.000Z |
Then I store the messages from list "TestMessages" and remember the IDs as "StoredMessageIDs"
And I refresh all indices
When I query for the current account messages with limit 1 and offset 3 and store them as "MessageInfo"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ public void prepareAListOfMessagesInTheSpecifiedRanges(String listKey, List<CucM
long stepSeconds = (endDate.getTime() - startDate.getTime()) / (1000L * (tmpMessage.getCount().longValue() - 1));

tmpCal.setTime(startDate);
for (int cnt = 0; cnt <= tmpMessage.getCount(); cnt++) {
for (int cnt = 0; cnt < tmpMessage.getCount(); cnt++) {
tmpMsg = createTestMessage(
((Account) stepData.get(LAST_ACCOUNT)).getId(),
((Device) stepData.get(LAST_DEVICE)).getId(),
Expand Down

0 comments on commit 58d9c36

Please sign in to comment.