chore: mqtt updates, integration test improvements

This commit is contained in:
Kamil Myśliwiec
2024-11-27 11:04:51 +01:00
parent 74e318c930
commit cf17e4d521
5 changed files with 19 additions and 9 deletions

View File

@@ -2,10 +2,11 @@ import { INestApplication } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
import { App } from 'supertest/types';
import { DisconnectedClientController } from '../src/disconnected.controller';
describe('Disconnected client', () => {
let server;
let server: App;
let app: INestApplication;
beforeEach(async () => {

View File

@@ -7,7 +7,7 @@ import {
} from '@nestjs/common';
import { ClientProxyFactory } from '@nestjs/microservices';
import { Observable, throwError } from 'rxjs';
import { catchError } from 'rxjs/operators';
import { catchError, tap } from 'rxjs/operators';
@Controller()
export class DisconnectedClientController {
@@ -31,6 +31,9 @@ export class DisconnectedClientController {
: new InternalServerErrorException(),
);
}),
tap({
error: () => client.close(),
}),
);
}
}