Skip to content

Commit 761e4e2

Browse files
Address test failure
1 parent 788303f commit 761e4e2

File tree

6 files changed

+13
-10
lines changed

6 files changed

+13
-10
lines changed

packages/firestore/src/core/firestore_client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ export class FirestoreClient {
375375
await this.remoteStore.shutdown();
376376
await this.sharedClientState.shutdown();
377377
await this.persistence.shutdown();
378-
378+
379379
// `removeChangeListener` must be called after shutting down the
380380
// RemoteStore as it will prevent the RemoteStore from retrieving
381381
// auth tokens.

packages/firestore/src/local/indexeddb_persistence.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ import {
7575
SimpleDbTransaction
7676
} from './simple_db';
7777
import { DocumentLike, WindowLike } from '../util/types';
78-
import {ignoreIfPrimaryLeaseLoss} from "./local_store";
78+
import { ignoreIfPrimaryLeaseLoss } from './local_store';
7979

8080
const LOG_TAG = 'IndexedDbPersistence';
8181

@@ -681,10 +681,10 @@ export class IndexedDbPersistence implements Persistence {
681681
}
682682
this.detachVisibilityHandler();
683683
this.detachWindowUnloadHook();
684-
await this.runTransaction('shutdown', 'readwrite', txn =>
685-
this.releasePrimaryLeaseIfHeld(txn).next(() =>
686-
this.removeClientMetadata(txn)
687-
)
684+
await this.runTransaction('shutdown', 'readwrite', txn =>
685+
this.releasePrimaryLeaseIfHeld(txn).next(() =>
686+
this.removeClientMetadata(txn)
687+
)
688688
).catch(e => ignoreIfPrimaryLeaseLoss(e));
689689
this.simpleDb.close();
690690

packages/firestore/test/integration/api/database.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,7 @@ apiDescribe('Database', (persistence: boolean) => {
10851085
await db.terminate();
10861086
});
10871087
});
1088-
1088+
10891089
// eslint-disable-next-line no-restricted-properties
10901090
(MEMORY_ONLY_BUILD ? it : it.skip)(
10911091
'recovers when persistence is missing',

packages/firestore/test/unit/local/indexeddb_persistence.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,6 +1182,7 @@ describe('IndexedDb: allowTabSynchronization', () => {
11821182
await expect(db1.start()).to.eventually.be.rejectedWith(
11831183
'IndexedDB transaction failed'
11841184
);
1185+
await db1.shutdown();
11851186
}
11861187
);
11871188
});

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ describeSpec('Persistence Recovery', ['no-ios', 'no-android'], () => {
840840
})
841841
.userUnlistens(query1);
842842
});
843-
843+
844844
specTest('Terminate (with recovery)', [], () => {
845845
return spec()
846846
.failDatabaseTransactions('shutdown')

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,9 @@ abstract class TestRunner {
716716
await this.remoteStore.enableNetwork();
717717
}
718718

719-
private async doShutdown(options?: {expectFailure?: boolean}): Promise<void> {
719+
private async doShutdown(options?: {
720+
expectFailure?: boolean;
721+
}): Promise<void> {
720722
try {
721723
await this.remoteStore.shutdown();
722724
await this.sharedClientState.shutdown();
@@ -725,7 +727,7 @@ abstract class TestRunner {
725727
// test run.
726728
await this.persistence.shutdown();
727729
expect(options?.expectFailure).to.not.be.true;
728-
730+
729731
this.started = false;
730732
} catch (e) {
731733
expect(options?.expectFailure).to.be.true;

0 commit comments

Comments
 (0)