Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void getGroupTest() {
@Test
@SuppressWarnings("all")
public void getGroupExceptionTest() throws Exception {
StatusRuntimeException exception = new StatusRuntimeException(Status.INTERNAL);
StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
mockErrorGroupService.addException(exception);

try {
Expand All @@ -109,7 +109,7 @@ public void getGroupExceptionTest() throws Exception {
client.getGroup(groupName);
Assert.fail("No exception raised");
} catch (ApiException e) {
Assert.assertEquals(Status.INTERNAL.getCode(), e.getStatusCode());
Assert.assertEquals(Status.INVALID_ARGUMENT.getCode(), e.getStatusCode());
}
}

Expand Down Expand Up @@ -137,7 +137,7 @@ public void updateGroupTest() {
@Test
@SuppressWarnings("all")
public void updateGroupExceptionTest() throws Exception {
StatusRuntimeException exception = new StatusRuntimeException(Status.INTERNAL);
StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
mockErrorGroupService.addException(exception);

try {
Expand All @@ -146,7 +146,7 @@ public void updateGroupExceptionTest() throws Exception {
client.updateGroup(group);
Assert.fail("No exception raised");
} catch (ApiException e) {
Assert.assertEquals(Status.INTERNAL.getCode(), e.getStatusCode());
Assert.assertEquals(Status.INVALID_ARGUMENT.getCode(), e.getStatusCode());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public void listGroupStatsTest() {
@Test
@SuppressWarnings("all")
public void listGroupStatsExceptionTest() throws Exception {
StatusRuntimeException exception = new StatusRuntimeException(Status.INTERNAL);
StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
mockErrorStatsService.addException(exception);

try {
Expand All @@ -129,7 +129,7 @@ public void listGroupStatsExceptionTest() throws Exception {
client.listGroupStats(projectName, timeRange);
Assert.fail("No exception raised");
} catch (ApiException e) {
Assert.assertEquals(Status.INTERNAL.getCode(), e.getStatusCode());
Assert.assertEquals(Status.INVALID_ARGUMENT.getCode(), e.getStatusCode());
}
}

Expand Down Expand Up @@ -166,7 +166,7 @@ public void listEventsTest() {
@Test
@SuppressWarnings("all")
public void listEventsExceptionTest() throws Exception {
StatusRuntimeException exception = new StatusRuntimeException(Status.INTERNAL);
StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
mockErrorStatsService.addException(exception);

try {
Expand All @@ -176,7 +176,7 @@ public void listEventsExceptionTest() throws Exception {
client.listEvents(projectName, groupId);
Assert.fail("No exception raised");
} catch (ApiException e) {
Assert.assertEquals(Status.INTERNAL.getCode(), e.getStatusCode());
Assert.assertEquals(Status.INVALID_ARGUMENT.getCode(), e.getStatusCode());
}
}

Expand All @@ -201,7 +201,7 @@ public void deleteEventsTest() {
@Test
@SuppressWarnings("all")
public void deleteEventsExceptionTest() throws Exception {
StatusRuntimeException exception = new StatusRuntimeException(Status.INTERNAL);
StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
mockErrorStatsService.addException(exception);

try {
Expand All @@ -210,7 +210,7 @@ public void deleteEventsExceptionTest() throws Exception {
client.deleteEvents(projectName);
Assert.fail("No exception raised");
} catch (ApiException e) {
Assert.assertEquals(Status.INTERNAL.getCode(), e.getStatusCode());
Assert.assertEquals(Status.INVALID_ARGUMENT.getCode(), e.getStatusCode());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void reportErrorEventTest() {
@Test
@SuppressWarnings("all")
public void reportErrorEventExceptionTest() throws Exception {
StatusRuntimeException exception = new StatusRuntimeException(Status.INTERNAL);
StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
mockReportErrorsService.addException(exception);

try {
Expand All @@ -109,7 +109,7 @@ public void reportErrorEventExceptionTest() throws Exception {
client.reportErrorEvent(projectName, event);
Assert.fail("No exception raised");
} catch (ApiException e) {
Assert.assertEquals(Status.INTERNAL.getCode(), e.getStatusCode());
Assert.assertEquals(Status.INVALID_ARGUMENT.getCode(), e.getStatusCode());
}
}
}
Loading