Revert "Revert "fix(microservice) Delete unnecessary call of grpcClient.start""

This commit is contained in:
Kamil Mysliwiec
2024-04-19 09:14:09 +02:00
committed by GitHub
parent 05a35b267f
commit 7d5adfcc1f
2 changed files with 0 additions and 14 deletions

View File

@@ -81,7 +81,6 @@ export class ServerGrpc extends Server implements CustomTransportStrategy {
public async start(callback?: () => void) {
await this.bindEvents();
this.grpcClient.start();
callback();
}

View File

@@ -51,13 +51,6 @@ describe('ServerGrpc', () => {
await server.close();
expect(bindEventsStub.called).to.be.true;
});
it('should call "client.start"', async () => {
const client = { start: sinon.spy() };
sinon.stub(server, 'createClient').callsFake(async () => client);
await server.listen(callback);
expect(client.start.called).to.be.true;
});
it('should call callback', async () => {
await server.listen(callback);
await server.close();
@@ -95,12 +88,6 @@ describe('ServerGrpc', () => {
await serverMulti.close();
expect(bindEventsStub.called).to.be.true;
});
it('should call "client.start"', async () => {
const client = { start: sinon.spy() };
sinon.stub(serverMulti, 'createClient').callsFake(async () => client);
await serverMulti.listen(callback);
expect(client.start.called).to.be.true;
});
it('should call callback', async () => {
await serverMulti.listen(callback);
await serverMulti.close();