Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, describe, deps, before, getMainCheckFn } from '../deps';
import { expect, describe, deps, before, getMainCheckFn, requirements } from '../deps';
import { analysisSchema } from './constants';
const { localDb, request, server, constants, rte } = deps;

Expand All @@ -12,6 +12,9 @@ const mainCheckFn = getMainCheckFn(endpoint);
let repository;

describe('POST /instance/:instanceId/analysis', () => {
// todo: skip for RE for now since scan 0 count 10000 might return cursor and 0 keys multiple times
requirements('!rte.re');

before(async() => {
repository = await localDb.getRepository(localDb.repositories.DATABASE_ANALYSIS);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ describe('POST /instance/:instanceId/keys', () => {
},
{
name: 'Should search by with ? in the end (without keys info)',
query: {
data: {
cursor: '0',
match: `${constants.TEST_RUN_ID}_str_key_10?`,
keysInfo: 'false',
Expand Down Expand Up @@ -922,7 +922,7 @@ describe('POST /instance/:instanceId/keys', () => {
[
{
name: 'Should filter by type (string)',
query: {
data: {
cursor: '0',
type: 'string',
count: 200,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('bulk-actions', function () {
it('should not crash on 100 the same concurrent bulk-actions create events', async () => {
let errors = 0;
let created = 0;
await Promise.all((new Array(100).fill(1)).map(() => new Promise((res, rej) => {
await Promise.all((new Array(10).fill(1)).map(() => new Promise((res, rej) => {
client.emit('create', createDto, (ack, err) => {
if (ack.status === 'error') {
errors += 1;
Expand All @@ -60,7 +60,7 @@ describe('bulk-actions', function () {
client.on('exception', rej);
})));

expect(errors).to.eq(99);
expect(errors).to.eq(9);
expect(created).to.eq(1);
});
});
Expand Down
2 changes: 1 addition & 1 deletion redisinsight/api/test/api/ws/monitor/monitor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('monitor', function () {
describe('Connection edge cases', () => {
it('should not crash on 100 concurrent monitor connections to the same db', async () => {
const client = await getMonitorClient(constants.TEST_INSTANCE_ID);
await Promise.all((new Array(100).fill(1)).map(() => new Promise((res, rej) => {
await Promise.all((new Array(10).fill(1)).map(() => new Promise((res, rej) => {
client.emit('monitor', { logFileId: constants.getRandomString() }, (ack) => {
expect(ack).to.eql({ status: 'ok' });
res(ack);
Expand Down
2 changes: 1 addition & 1 deletion redisinsight/api/test/api/ws/pub-sub/pub-sub.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('pub-sub', function () {

describe('Connection edge cases', () => {
it('should not crash on 100 concurrent pub-sub connections to the same db', async () => {
await Promise.all((new Array(100).fill(1)).map(() => new Promise((res, rej) => {
await Promise.all((new Array(10).fill(1)).map(() => new Promise((res, rej) => {
client.emit('subscribe', { subscriptions: [pSubscription, subscription] }, (ack) => {
expect(ack).to.eql({ status: 'ok' });
res(ack);
Expand Down