wait = (time = 1000) =>
    new Promise(resolve => {
      setTimeout(resolve, time)
    })
Session lifetime on broker is configured in docker-compose.2_4_oauthbearer.yml with 15000ms in env KAFKA_CONNECTIONS_MAX_REAUTH_MS
see https://docs.confluent.io/platform/current/installation/configuration/broker-configs.html#brokerconfigs_connections.max.reauth.ms