<commit_before>import * as util from 'util';

import { INestApplication } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import * as request from 'supertest';
import { KafkaConcurrentController } from '../src/kafka-concurrent/kafka-concurrent.controller';
import { KafkaConcurrentMessagesController } from '../src/kafka-concurrent/kafka-concurrent.messages.controller';

import { ITopicMetadata, Kafka, Admin, logLevel } from 'kafkajs';

describe('Kafka concurrent', function() {
  const numbersOfServers = 3;

  const requestTopic = 'math.sum.sync.number.wait';
  const responseTopic = 'math.sum.sync.number.wait.reply';

  let admin: Admin;
  let servers: any[] = [];
  let apps: INestApplication[] = [];

    // set timeout to be longer
  this.timeout(30000);

  const startServer = async () => {
    const module = await Test.createTestingModule({
      controllers: [KafkaConcurrentController, KafkaConcurrentMessagesController],
    }).compile();
  
    const app = module.createNestApplication();
    
    const server = app.getHttpAdapter().getInstance();
  
    app.connectMicroservice({<commit_msg>feat(microservices): Fixes changes to kafka client<commit_after>import * as util from 'util';

import { INestApplication } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import * as request from 'supertest';
import { KafkaConcurrentController } from '../src/kafka-concurrent/kafka-concurrent.controller';
import { KafkaConcurrentMessagesController } from '../src/kafka-concurrent/kafka-concurrent.messages.controller';

import { ITopicMetadata, Kafka, Admin, logLevel } from 'kafkajs';

describe('Kafka concurrent', function() {
  const numbersOfServers = 3;

  const requestTopic = 'math.sum.sync.number.wait';
  const responseTopic = 'math.sum.sync.number.wait.reply';

  let admin: Admin;
  const servers: any[] = [];
  const apps: INestApplication[] = [];

    // set timeout to be longer
  this.timeout(30000);

  const startServer = async () => {
    const module = await Test.createTestingModule({
      controllers: [KafkaConcurrentController, KafkaConcurrentMessagesController],
    }).compile();
  
    const app = module.createNestApplication();
    
    const server = app.getHttpAdapter().getInstance();
  
    app.connectMicroservice({
{'fraction_non_alphanumeric': 0.1292295148797391, 'fraction_numerical': 0.004891969017529555, 'mean_word_length': 4.527027027027027, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3310579', 'n_tokens_mistral': 721, 'n_tokens_neox': 689, 'n_words': 176}