src/test/java/org/embulk/input/zendesk/clients/TestZendeskRestClient.java in embulk-input-zendesk-0.3.0 vs src/test/java/org/embulk/input/zendesk/clients/TestZendeskRestClient.java in embulk-input-zendesk-0.3.1
- old
+ new
@@ -88,19 +88,19 @@
}
@Test
public void doGetRetryFail429WithoutRetryAfter()
{
- String expectedMessage = "Number of allowed incremental export API requests per minute exceeded";
+ String expectedMessage = "Status: '429', error message: 'Number of allowed incremental export API requests per minute exceeded'";
int expectedRetryTime = 3;
testExceptionMessageForDoGet("doGet429", expectedMessage, expectedRetryTime);
}
@Test
public void doGetRetryFail429WithRetryAfter()
{
- String expectedMessage = "Number of allowed incremental export API requests per minute exceeded";
+ String expectedMessage = "Status: '429', error message: 'Number of allowed incremental export API requests per minute exceeded'";
int expectedRetryTime = 3;
when(response.containsHeader("x-rate-limit")).thenReturn(true);
when(response.getFirstHeader("x-rate-limit")).thenReturn(header);
when(response.getFirstHeader("Retry-After")).thenReturn(header);
@@ -121,19 +121,19 @@
}
@Test
public void doGetRetry422FailBecauseNotContainTooRecentStartTime()
{
- String expectedMessage = "Status: '422', error message 'dummy text'";
+ String expectedMessage = "Status: '422', error message: 'dummy text'";
int expectedRetryTime = 1;
testExceptionMessageForDoGet("doGet422NotContainTooRecentStartTime", expectedMessage, expectedRetryTime);
}
@Test
public void doGetNotRetry422BecauseContainTooRecentStartTime()
{
- String expectedMessage = "Status: '422', error message 'dummy text'";
+ String expectedMessage = "Status: '422', error message: 'dummy text'";
int expectedRetryTime = 1;
testExceptionMessageForDoGet("doGet422ContainTooRecentStartTime", expectedMessage, expectedRetryTime);
}
@Test
@@ -156,10 +156,10 @@
@Test
public void doGetRetry404()
{
setup("doGet404");
- String expectedMessage = "dummy text";
+ String expectedMessage = "Status: '404', error message: 'dummy text'";
int expectedRetryTime = 1;
try {
zendeskRestClient.doGet("any", task, false);
fail("Should not reach here");
}