Skip to content
This repository has been archived by the owner on Oct 14, 2023. It is now read-only.

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 committed Sep 22, 2020
1 parent ec5004f commit 6bca425
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 6bca425

Please sign in to comment.