johnjcasey commented on a change in pull request #16096:
URL: https://github.com/apache/beam/pull/16096#discussion_r761417077



##########
File path: 
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryServicesImplTest.java
##########
@@ -1091,6 +1092,52 @@ public void testFailInsertOtherRetry() throws Exception {
     verifyWriteMetricWasSet("project", "dataset", "table", "actually 
forbidden", 1);
   }
 
+  /** Tests that {@link DatasetServiceImpl#insertAll} logs suggested remedy 
for insert timeouts. */
+  @Test
+  public void testInsertTimeoutLog() throws Exception {
+    TableReference ref =
+        new 
TableReference().setProjectId("project").setDatasetId("dataset").setTableId("table");
+    List<FailsafeValueInSingleWindow<TableRow, TableRow>> rows = new 
ArrayList<>();
+    rows.add(wrapValue(new TableRow()));
+
+    setupMockResponses(
+        response -> {
+          when(response.getStatusCode()).thenReturn(400);
+          when(response.getContentType()).thenReturn(Json.MEDIA_TYPE);
+          when(response.getContent())
+              .thenReturn(
+                  toStream(errorWithReasonAndStatus("No rows present in the 
request.", 400)));

Review comment:
       I've added the padding here




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to