Skip to content

Commit

Permalink
feat: small updates
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-yarmosh committed Mar 28, 2024
1 parent b7c0a9e commit 7bb4139
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/e2e/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ const dropAllTables = async (sql: Knex) => {

const flushRedis = async () => {
const dbs = [ 0, 1, 2 ];
dbs.forEach(async (database) => {
await Promise.all(dbs.map(async (database) => {
const client = createClient({
...config.util.toObject(config.get('redis')),
database,
});
await client.flushDb();
});
}));
};
1 change: 1 addition & 0 deletions test/e2e/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const waitProbeToDisconnect = async () => {

for (;;) {
try {
// Probe list sync across workers takes a few seconds. So we should retry until all workers return the same result. Multiplying by 2 for safety.
responses = await Promise.all(_.times(processes * 2, (() => got<any>('http://localhost:80/v1/probes', { responseType: 'json' }))));
} catch (err) {
logger.info((err as RequestError).code);
Expand Down

0 comments on commit 7bb4139

Please sign in to comment.