Skip to content

Commit ed012ef

Browse files
Pubsub update (#1818)
* Update GAPIC layer * Manual updates to support pubsub changes
1 parent fac54b9 commit ed012ef

34 files changed

Lines changed: 1372 additions & 516 deletions

File tree

google-cloud-errorreporting/src/test/java/com/google/cloud/errorreporting/spi/v1beta1/ErrorGroupServiceClientTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public void getGroupTest() {
100100
@Test
101101
@SuppressWarnings("all")
102102
public void getGroupExceptionTest() throws Exception {
103-
StatusRuntimeException exception = new StatusRuntimeException(Status.INTERNAL);
103+
StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
104104
mockErrorGroupService.addException(exception);
105105

106106
try {
@@ -109,7 +109,7 @@ public void getGroupExceptionTest() throws Exception {
109109
client.getGroup(groupName);
110110
Assert.fail("No exception raised");
111111
} catch (ApiException e) {
112-
Assert.assertEquals(Status.INTERNAL.getCode(), e.getStatusCode());
112+
Assert.assertEquals(Status.INVALID_ARGUMENT.getCode(), e.getStatusCode());
113113
}
114114
}
115115

@@ -137,7 +137,7 @@ public void updateGroupTest() {
137137
@Test
138138
@SuppressWarnings("all")
139139
public void updateGroupExceptionTest() throws Exception {
140-
StatusRuntimeException exception = new StatusRuntimeException(Status.INTERNAL);
140+
StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
141141
mockErrorGroupService.addException(exception);
142142

143143
try {
@@ -146,7 +146,7 @@ public void updateGroupExceptionTest() throws Exception {
146146
client.updateGroup(group);
147147
Assert.fail("No exception raised");
148148
} catch (ApiException e) {
149-
Assert.assertEquals(Status.INTERNAL.getCode(), e.getStatusCode());
149+
Assert.assertEquals(Status.INVALID_ARGUMENT.getCode(), e.getStatusCode());
150150
}
151151
}
152152
}

google-cloud-errorreporting/src/test/java/com/google/cloud/errorreporting/spi/v1beta1/ErrorStatsServiceClientTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public void listGroupStatsTest() {
119119
@Test
120120
@SuppressWarnings("all")
121121
public void listGroupStatsExceptionTest() throws Exception {
122-
StatusRuntimeException exception = new StatusRuntimeException(Status.INTERNAL);
122+
StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
123123
mockErrorStatsService.addException(exception);
124124

125125
try {
@@ -129,7 +129,7 @@ public void listGroupStatsExceptionTest() throws Exception {
129129
client.listGroupStats(projectName, timeRange);
130130
Assert.fail("No exception raised");
131131
} catch (ApiException e) {
132-
Assert.assertEquals(Status.INTERNAL.getCode(), e.getStatusCode());
132+
Assert.assertEquals(Status.INVALID_ARGUMENT.getCode(), e.getStatusCode());
133133
}
134134
}
135135

@@ -166,7 +166,7 @@ public void listEventsTest() {
166166
@Test
167167
@SuppressWarnings("all")
168168
public void listEventsExceptionTest() throws Exception {
169-
StatusRuntimeException exception = new StatusRuntimeException(Status.INTERNAL);
169+
StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
170170
mockErrorStatsService.addException(exception);
171171

172172
try {
@@ -176,7 +176,7 @@ public void listEventsExceptionTest() throws Exception {
176176
client.listEvents(projectName, groupId);
177177
Assert.fail("No exception raised");
178178
} catch (ApiException e) {
179-
Assert.assertEquals(Status.INTERNAL.getCode(), e.getStatusCode());
179+
Assert.assertEquals(Status.INVALID_ARGUMENT.getCode(), e.getStatusCode());
180180
}
181181
}
182182

@@ -201,7 +201,7 @@ public void deleteEventsTest() {
201201
@Test
202202
@SuppressWarnings("all")
203203
public void deleteEventsExceptionTest() throws Exception {
204-
StatusRuntimeException exception = new StatusRuntimeException(Status.INTERNAL);
204+
StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
205205
mockErrorStatsService.addException(exception);
206206

207207
try {
@@ -210,7 +210,7 @@ public void deleteEventsExceptionTest() throws Exception {
210210
client.deleteEvents(projectName);
211211
Assert.fail("No exception raised");
212212
} catch (ApiException e) {
213-
Assert.assertEquals(Status.INTERNAL.getCode(), e.getStatusCode());
213+
Assert.assertEquals(Status.INVALID_ARGUMENT.getCode(), e.getStatusCode());
214214
}
215215
}
216216
}

google-cloud-errorreporting/src/test/java/com/google/cloud/errorreporting/spi/v1beta1/ReportErrorsServiceClientTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public void reportErrorEventTest() {
9999
@Test
100100
@SuppressWarnings("all")
101101
public void reportErrorEventExceptionTest() throws Exception {
102-
StatusRuntimeException exception = new StatusRuntimeException(Status.INTERNAL);
102+
StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
103103
mockReportErrorsService.addException(exception);
104104

105105
try {
@@ -109,7 +109,7 @@ public void reportErrorEventExceptionTest() throws Exception {
109109
client.reportErrorEvent(projectName, event);
110110
Assert.fail("No exception raised");
111111
} catch (ApiException e) {
112-
Assert.assertEquals(Status.INTERNAL.getCode(), e.getStatusCode());
112+
Assert.assertEquals(Status.INVALID_ARGUMENT.getCode(), e.getStatusCode());
113113
}
114114
}
115115
}

0 commit comments

Comments
 (0)