-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Shutdown and awaitTermination for showcase clients #1669
Merged
Merged
Changes from 19 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
28812e5
chore: Properly shutdown and awaitTermination for showcase clients
lqiu96 3df7edd
chore: Update showcase tests
lqiu96 8569bf4
chore: Increase the initial unary timeout value
lqiu96 b79275f
chore: Await Termination after close()
lqiu96 65eb06e
chore: Run showcase tests one by one
lqiu96 b2d5769
chore: Update to use the constant values
lqiu96 20f3083
fix: Implement awaitTermination for ManagedHttpJsonChannel
lqiu96 f7c1543
Merge branch 'main-await_termination' into main-shutdown_showcase_tests
lqiu96 74f8960
fix: ManagedHttpJsonChannel's executor is not static
lqiu96 6a8f3ba
chore: Update ManagedHttpJsonChannel logic
lqiu96 baf4679
chore: Update LRO retry values
lqiu96 e4fd3a3
chore: Create and Destroy clients once per test
lqiu96 ca17198
chore: Resolve merge conflicts
lqiu96 3c82498
chore: Address code smell
lqiu96 0141c23
chore: Update LRO retry values
lqiu96 0acb243
chore: Use TTL for LROs
lqiu96 f8dc9ac
chore: Use LRO defaults for initial callable
lqiu96 ced4197
chore: Run showcase tests one by one
lqiu96 3a4e1b8
chore: Empty commit
lqiu96 fa3b8db
Merge branch 'main' into main-shutdown_showcase_tests
lqiu96 d39bee7
Merge branch 'main' into main-shutdown_showcase_tests
lqiu96 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,9 @@ | |
import com.google.showcase.v1beta1.it.util.TestClientInitializer; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
import org.junit.Before; | ||
import java.util.concurrent.TimeUnit; | ||
import org.junit.AfterClass; | ||
import org.junit.BeforeClass; | ||
import org.junit.Test; | ||
|
||
public class ITCommonServiceMixins { | ||
|
@@ -51,18 +53,28 @@ public class ITCommonServiceMixins { | |
.setName("projects/showcase/locations/us-west") | ||
.setDisplayName("us-west") | ||
.build()); | ||
private EchoClient grpcClient; | ||
private EchoClient httpjsonClient; | ||
private static EchoClient grpcClient; | ||
private static EchoClient httpjsonClient; | ||
|
||
@Before | ||
public void createClients() throws Exception { | ||
@BeforeClass | ||
public static void createClients() throws Exception { | ||
// Create gRPC Echo Client | ||
grpcClient = TestClientInitializer.createGrpcEchoClient(); | ||
|
||
// Create HttpJson Echo Client | ||
httpjsonClient = TestClientInitializer.createHttpJsonEchoClient(); | ||
} | ||
|
||
@AfterClass | ||
public static void destroyClients() throws InterruptedException { | ||
grpcClient.close(); | ||
httpjsonClient.close(); | ||
|
||
grpcClient.awaitTermination(TestClientInitializer.AWAIT_TERMINATION_SECONDS, TimeUnit.SECONDS); | ||
httpjsonClient.awaitTermination( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This method is not implemented yet #1663 |
||
TestClientInitializer.AWAIT_TERMINATION_SECONDS, TimeUnit.SECONDS); | ||
} | ||
|
||
@Test | ||
public void testGrpc_getLocation() { | ||
GetLocationRequest request = | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Static
DEFAULT_EXECUTOR
error'd out on the unit tests. Same executor was being used and it was shutdown after the first test.