Skip to content

Commit

Permalink
Clean up grpc channel between tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ignas committed Dec 17, 2023
1 parent 0998241 commit a785007
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ class NukagitIntegrationTest extends Specification {
var component = DaggerTestComponent.create()
SshClient sshClient
KeyPair keyPair

ManagedChannel grpcChannel
RepositoriesServiceGrpc.RepositoriesServiceBlockingStub repositoriesGrpcClient
UsersServiceGrpc.UsersServiceBlockingStub usersGrpcClient

int sshPort
int grpcPort

Expand Down Expand Up @@ -129,6 +132,8 @@ class NukagitIntegrationTest extends Specification {

def cleanup() {
sshClient.stop()
grpcChannel.shutdownNow()
grpcChannel.awaitTermination(1, TimeUnit.SECONDS)
component.grpcServer().shutdownNow()
component.grpcServer().awaitTermination(1, TimeUnit.SECONDS)
component.sshServer().stop()
Expand Down

0 comments on commit a785007

Please sign in to comment.