Skip to content

Commit 28a944b

Browse files
committed
refactor: minor modification to the workload generator for sdam_viz
1 parent a95347a commit 28a944b

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

test/tools/sdam_viz

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,7 @@ async function run() {
9090
await client.connect();
9191

9292
if (argv.workload) {
93-
for (;;) {
94-
if (workloadInterrupt) {
95-
return;
96-
}
97-
93+
while (!workloadInterrupt) {
9894
await wait(2000);
9995

10096
try {

test/unit/sdam/server_selection/select_servers_tests.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ describe('selectServers', function() {
2020
it('should error immediately if timeout exceeds start time', function(done) {
2121
const topology = new Topology('invalid:27019');
2222
const start = process.hrtime();
23-
start[0] = start[0] - 500;
23+
start[0] = start[0] - 1;
2424

25-
selectServers(topology, ReadPreference.primary, 500, start, err => {
25+
selectServers(topology, ReadPreference.primary, 1000, start, err => {
2626
expect(err).to.exist;
2727
done();
2828
});

0 commit comments

Comments
 (0)