Skip to content

Commit 2e3cb29

Browse files
committed
fix test
1 parent 8ea0ba3 commit 2e3cb29

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

packages/compass-connections/src/stores/connections-store-redux.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1639,6 +1639,7 @@ const connectWithOptions = (
16391639
}
16401640

16411641
started = true;
1642+
// This is used for Data Explorer connection latency tracing
16421643
log.info(
16431644
mongoLogId(1_001_000_005),
16441645
'Compass Connection Attempt Started',
@@ -1670,6 +1671,7 @@ const connectWithOptions = (
16701671
// aborted
16711672
if (!dataService || connectionAttempt.isClosed()) {
16721673
cancelled = true;
1674+
// This is used for Data Explorer connection latency tracing
16731675
log.info(
16741676
mongoLogId(1_001_000_007),
16751677
'Compass Connection Attempt Cancelled',
@@ -1846,6 +1848,7 @@ const connectWithOptions = (
18461848
);
18471849

18481850
succeeded = true;
1851+
// This is used for Data Explorer connection latency tracing
18491852
log.info(
18501853
mongoLogId(1_001_000_006),
18511854
'Compass Connection Attempt Succeeded',

packages/data-service/src/data-service.spec.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,10 @@ describe('DataService', function () {
167167
{
168168
connectionString:
169169
'mongodb://iLoveJavascript?serverSelectionTimeoutMS=5',
170-
lookup: () => {
171-
throw new Error('test error');
172-
},
170+
lookup: () => ({
171+
wsURL: 'ws://localhost:12345/mongodb/atlas/websocket',
172+
clusterName: 'iLoveJavascript',
173+
}),
173174
},
174175
logCollector
175176
);

0 commit comments

Comments
 (0)