Skip to content

Commit 447b94f

Browse files
committed
Revert more for CI failures
1 parent dffe5b4 commit 447b94f

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

packages/database/src/api/Database.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import { Provider } from '@firebase/component';
2727
import {
2828
getModularInstance,
2929
createMockUserToken,
30-
deepEqual,
30+
//deepEqual, DEDB replace
3131
EmulatorMockTokenOptions,
3232
getDefaultEmulatorHostnameAndPort
3333
} from '@firebase/util';
@@ -86,10 +86,12 @@ let useRestClient = false;
8686
function repoManagerApplyEmulatorSettings(
8787
repo: Repo,
8888
host: string,
89+
port: number, // DEDB remove
8990
tokenProvider?: AuthTokenProvider
9091
): void {
9192
repo.repoInfo_ = new RepoInfo(
92-
host,
93+
//host, DDB replace
94+
`${host}:${port}`, // DEDB remove
9395
/* secure= */ false,
9496
repo.repoInfo_.namespace,
9597
repo.repoInfo_.webSocketOnly,
@@ -352,11 +354,12 @@ export function connectDatabaseEmulator(
352354
db._checkNotDeleted('useEmulator');
353355
const hostAndPort = `${host}:${port}`;
354356
const repo = db._repoInternal;
357+
/*
355358
if (db._instanceStarted) {
356359
// If the instance has already been started, then silenty fail if this function is called again
357360
// with the same parameters. If the parameters differ then assert.
358361
if (
359-
hostAndPort === repo.repoInfo_.host &&
362+
hostAndPort === db._repoInternal.repoInfo_.host &&
360363
deepEqual(options, repo.repoInfo_.emulatorOptions)
361364
) {
362365
return;
@@ -365,6 +368,7 @@ export function connectDatabaseEmulator(
365368
'connectDatabaseEmulator() cannot alter the emulator configuration after the database instance has started.'
366369
);
367370
}
371+
*/
368372

369373
let tokenProvider: EmulatorTokenProvider | undefined = undefined;
370374
if (repo.repoInfo_.nodeAdmin) {
@@ -383,7 +387,9 @@ export function connectDatabaseEmulator(
383387
}
384388

385389
// Modify the repo to apply emulator settings
386-
repoManagerApplyEmulatorSettings(repo, hostAndPort, tokenProvider);
390+
//repoManagerApplyEmulatorSettings(repo, hostAndPort, tokenProvider); // DDB Replace
391+
repoManagerApplyEmulatorSettings(repo, host, port, tokenProvider); // DDB Remove
392+
387393
}
388394

389395
/**

0 commit comments

Comments
 (0)