Skip to content

Commit

Permalink
samples: increased timeout up to 450 secs since batch LRO reaches 5 m…
Browse files Browse the repository at this point in the history
…in mark sometimes (#286)
  • Loading branch information
munkhuushmgl authored Sep 22, 2020
1 parent 93b1ba7 commit f67a001
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public static void batchTranslateText(
client.batchTranslateTextAsync(request);

System.out.println("Waiting for operation to complete...");
BatchTranslateResponse response = future.get(300, TimeUnit.SECONDS);
BatchTranslateResponse response = future.get(450, TimeUnit.SECONDS);
System.out.printf("Total Characters: %s\n", response.getTotalCharacters());
System.out.printf("Translated Characters: %s\n", response.getTranslatedCharacters());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public static void batchTranslateTextWithGlossary(
client.batchTranslateTextAsync(request);

System.out.println("Waiting for operation to complete...");
BatchTranslateResponse response = future.get(300, TimeUnit.SECONDS);
BatchTranslateResponse response = future.get(450, TimeUnit.SECONDS);
// Display the translation for each input text provided
System.out.printf("Total Characters: %s\n", response.getTotalCharacters());
System.out.printf("Translated Characters: %s\n", response.getTranslatedCharacters());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public static void batchTranslateTextWithGlossaryAndModel(
client.batchTranslateTextAsync(request);

System.out.println("Waiting for operation to complete...");
BatchTranslateResponse response = future.get(300, TimeUnit.SECONDS);
BatchTranslateResponse response = future.get(450, TimeUnit.SECONDS);
// Display the translation for each input text provided
System.out.printf("Total Characters: %s\n", response.getTotalCharacters());
System.out.printf("Translated Characters: %s\n", response.getTranslatedCharacters());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public static void batchTranslateTextWithModel(
client.batchTranslateTextAsync(request);

System.out.println("Waiting for operation to complete...");
BatchTranslateResponse response = future.get(300, TimeUnit.SECONDS);
BatchTranslateResponse response = future.get(450, TimeUnit.SECONDS);
// Display the translation for each input text provided
System.out.printf("Total Characters: %s\n", response.getTotalCharacters());
System.out.printf("Translated Characters: %s\n", response.getTranslatedCharacters());
Expand Down

0 comments on commit f67a001

Please sign in to comment.