Skip to content

Commit 3cb3db6

Browse files
Using fixed client IDs in spec tests (#992)
1 parent 7b318b4 commit 3cb3db6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/firestore/test/unit/specs/spec_test_runner.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ import {
7676
import { assert, fail } from '../../../src/util/assert';
7777
import { AsyncQueue, TimerId } from '../../../src/util/async_queue';
7878
import { FirestoreError } from '../../../src/util/error';
79-
import { AnyDuringMigration, AnyJs, AutoId } from '../../../src/util/misc';
79+
import { AnyDuringMigration, AnyJs } from '../../../src/util/misc';
8080
import * as obj from '../../../src/util/obj';
8181
import { ObjectMap } from '../../../src/util/obj_map';
8282
import { Deferred, sequence } from '../../../src/util/promise';
@@ -385,9 +385,10 @@ abstract class TestRunner {
385385
constructor(
386386
protected readonly platform: TestPlatform,
387387
private sharedWrites: SharedWriteTracker,
388+
clientIndex: number,
388389
config: SpecConfig
389390
) {
390-
this.clientId = AutoId.newId();
391+
this.clientId = `client${clientIndex}`;
391392
this.databaseInfo = new DatabaseInfo(
392393
new DatabaseId('project'),
393394
'persistenceKey',
@@ -1424,12 +1425,14 @@ export async function runSpec(
14241425
runners[clientIndex] = new IndexedDbTestRunner(
14251426
platform,
14261427
outstandingMutations,
1428+
clientIndex,
14271429
config
14281430
);
14291431
} else {
14301432
runners[clientIndex] = new MemoryTestRunner(
14311433
platform,
14321434
outstandingMutations,
1435+
clientIndex,
14331436
config
14341437
);
14351438
}

0 commit comments

Comments
 (0)