Skip to content

Commit 82762f6

Browse files
author
Artem
committed
fix flaky test
1 parent f1e983c commit 82762f6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

redisinsight/api/test/api/feature/POST-features-sync.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
describe,
55
deps,
66
fsExtra,
7-
getMainCheckFn,
7+
getMainCheckFn, sleep
88
} from '../deps';
99
import { constants } from '../../helpers/constants';
1010
import * as defaultConfig from '../../../config/features-config.json';
@@ -88,6 +88,9 @@ describe('POST /features/sync', () => {
8888
const [config] = await featureConfigRepository.find();
8989

9090
expect(config).to.eq(undefined);
91+
92+
// flaky test. wait for a while
93+
await sleep(1000);
9194
},
9295
statusCode: 200,
9396
checkFn: async () => {

redisinsight/api/test/helpers/remote-server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ export const initRemoteServer = async () => {
88
await fs.ensureDir(constants.TEST_REMOTE_STATIC_PATH);
99

1010
const app = express();
11-
app.use(constants.TEST_REMOTE_STATIC_URI, express.static(constants.TEST_REMOTE_STATIC_PATH))
11+
app.use(constants.TEST_REMOTE_STATIC_URI, express.static(constants.TEST_REMOTE_STATIC_PATH, { etag: false }))
1212
await app.listen(5551, '0.0.0.0');
1313
}

0 commit comments

Comments
 (0)