Skip to content

Commit 645630a

Browse files
committed
move prose test to unit test file
1 parent aa2542d commit 645630a

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

test/integration/server-discovery-and-monitoring/server_discovery_and_monitoring.prose.test.ts

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -183,40 +183,4 @@ describe('Server Discovery and Monitoring Prose Tests', function () {
183183
}
184184
});
185185
});
186-
187-
describe('Heartbeat tests', function () {
188-
let client: MongoClient;
189-
let connectSpy;
190-
const events: { event: any; time: number }[] = [];
191-
192-
// Spy on socket constructor
193-
194-
beforeEach(function () {
195-
client = this.configuration.newClient({
196-
heartbeatFrequencyMS: 10000,
197-
appName: 'HeartbeatTest',
198-
maxPoolSize: 1,
199-
minPoolSize: 0
200-
});
201-
202-
client.on(SERVER_HEARTBEAT_STARTED, event => {
203-
events.push({ event, time: performance.now() });
204-
});
205-
206-
// set up spy
207-
connectSpy = sinon.spy(connect);
208-
});
209-
210-
afterEach(async function () {
211-
sinon.restore();
212-
});
213-
214-
it('emits the first HeartbeatStartedEvent after the monitoring socket was created', async function () {
215-
await client.connect();
216-
await setTimeout(2000);
217-
await client.close();
218-
219-
expect(events).to.have.length.gte(2);
220-
});
221-
});
222186
});

0 commit comments

Comments
 (0)