Skip to content

Commit 515deef

Browse files
committed
When we run out of data because the tickets expired and the paging tests fail, make this test create enough
1 parent a882405 commit 515deef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/test/java/org/zendesk/client/v2/RealSmokeTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ public void createSolveTickets() throws Exception {
262262
createClientWithTokenOrPassword();
263263
assumeThat("Must have a requester email", config.getProperty("requester.email"), notNullValue());
264264
Ticket ticket;
265+
long firstId = Long.MAX_VALUE;
265266
do {
266267
Ticket t = new Ticket(
267268
new Ticket.Requester(config.getProperty("requester.name"), config.getProperty("requester.email")),
@@ -280,7 +281,8 @@ public void createSolveTickets() throws Exception {
280281
assertThat(ticket.getRequesterId(), notNullValue());
281282
assertThat(ticket.getDescription(), is(t.getComment().getBody()));
282283
assertThat(instance.getTicket(ticket.getId()), notNullValue());
283-
} while (ticket.getId() < 200L); // seed enough data for the paging tests
284+
firstId = Math.min(ticket.getId(), firstId);
285+
} while (ticket.getId() < firstId + 200L); // seed enough data for the paging tests
284286
}
285287

286288
@Test

0 commit comments

Comments
 (0)