lundi 1 octobre 2018

How to start and use only one gRPC Server for all test classes in Spring Boot?

I'm implementing gRPC endpoints with Spring Boot. To run unit tests, I should build channel:

@Before
public final void setupChannels() {
     ManagedChannel channel = onChannelBuild(ManagedChannelBuilder.forAddress("localhost", getPort()).usePlaintext()).build();
}

My question is how to setup channel before all tests and use it in them?

Aucun commentaire:

Enregistrer un commentaire