From 1f69e8a3529c95e0cd7358de182b9cd945a04d4c Mon Sep 17 00:00:00 2001 From: Mark Duckworth <1124037+MarkDuckworth@users.noreply.github.com> Date: Thu, 7 May 2026 14:43:38 -0600 Subject: [PATCH 1/7] feat(firestore): port remote ID fix from firestore --- .../firestore/core/TargetIdGenerator.java | 18 + .../firestore/remote/RemoteStore.java | 261 +- .../firestore/remote/RemoteTargetId.java | 60 + .../remote/WatchChangeAggregator.java | 97 +- .../firestore/remote/MockDatastore.java | 9 +- .../firebase/firestore/spec/SpecTestCase.java | 256 +- .../test/resources/json/bundle_spec_test.json | 407 +- .../json/existence_filter_spec_test.json | 6 + .../test/resources/json/limbo_spec_test.json | 2525 ++++------- .../json/listen_source_spec_test.json | 1238 ++---- .../test/resources/json/listen_spec_test.json | 3868 ++++++----------- .../json/remote_store_spec_test.json | 385 ++ .../testutil/TestTargetMetadataProvider.java | 12 +- .../firebase/firestore/testutil/TestUtil.java | 27 +- 14 files changed, 3652 insertions(+), 5517 deletions(-) create mode 100644 firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteTargetId.java diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/core/TargetIdGenerator.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/core/TargetIdGenerator.java index fcd94cd8a19..ddbf288812e 100644 --- a/firebase-firestore/src/main/java/com/google/firebase/firestore/core/TargetIdGenerator.java +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/core/TargetIdGenerator.java @@ -53,6 +53,24 @@ public static TargetIdGenerator forSyncEngine() { return new TargetIdGenerator(SYNC_ENGINE_ID, 1); } + /** + * Creates and returns a new TargetIdGenerator for remote target cache watches. + * + * @return A new instance of TargetIdGenerator starting at 1000 (even). + */ + public static TargetIdGenerator forRemoteTargetCache() { + return new TargetIdGenerator(QUERY_CACHE_ID, 1000); + } + + /** + * Creates and returns a new TargetIdGenerator for remote sync engine watches. + * + * @return A new instance of TargetIdGenerator starting at 1001 (odd). + */ + public static TargetIdGenerator forRemoteSyncEngine() { + return new TargetIdGenerator(SYNC_ENGINE_ID, 1001); + } + private static final int QUERY_CACHE_ID = 0; private static final int SYNC_ENGINE_ID = 1; diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteStore.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteStore.java index 05f2bfa9837..39b923514c2 100644 --- a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteStore.java +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteStore.java @@ -26,6 +26,8 @@ import com.google.firebase.firestore.PipelineResultObserver; import com.google.firebase.firestore.core.OnlineState; import com.google.firebase.firestore.core.Query; +import com.google.firebase.firestore.core.TargetIdGenerator; +import com.google.firebase.firestore.core.TargetOrPipeline; import com.google.firebase.firestore.core.Transaction; import com.google.firebase.firestore.local.LocalStore; import com.google.firebase.firestore.local.QueryPurpose; @@ -49,6 +51,8 @@ import com.google.protobuf.ByteString; import io.grpc.Status; import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Collections; import java.util.Deque; import java.util.HashMap; import java.util.List; @@ -132,7 +136,13 @@ public interface RemoteStoreCallback { * removed with unlistens are removed eagerly without waiting for confirmation from the listen * stream. */ - private final Map listenTargets; + private final Map listenTargets; + + private final Map targetIdMapSdkToRemote; + private final Map targetIdMapRemoteToSdk; + + private final TargetIdGenerator targetCacheTargetIdGenerator; + private final TargetIdGenerator syncEngineTargetIdGenerator; private final OnlineStateTracker onlineStateTracker; @@ -171,6 +181,12 @@ public RemoteStore( this.connectivityMonitor = connectivityMonitor; listenTargets = new HashMap<>(); + targetIdMapSdkToRemote = new HashMap<>(); + targetIdMapRemoteToSdk = new HashMap<>(); + + targetCacheTargetIdGenerator = TargetIdGenerator.forRemoteTargetCache(); + syncEngineTargetIdGenerator = TargetIdGenerator.forRemoteSyncEngine(); + writePipeline = new ArrayDeque<>(); onlineStateTracker = @@ -355,6 +371,14 @@ public void handleCredentialChange() { } } + private int generateRemoteTargetId(int sdkTargetId) { + if (sdkTargetId % 2 != 0) { + return syncEngineTargetIdGenerator.nextId(); + } else { + return targetCacheTargetIdGenerator.nextId(); + } + } + // Watch Stream /** @@ -362,26 +386,84 @@ public void handleCredentialChange() { * *

It is a no-op if the target of the given query data is already being listened to. */ + private String getPipelineCanonicalIdExceptSort( + com.google.firebase.firestore.RealtimePipeline p) { + String canonicalId = p.toString(); + String[] stages = canonicalId.split("\\|"); + List stripped = new ArrayList<>(); + for (String stage : stages) { + if (!stage.startsWith("sort")) { + stripped.add(stage); + } + } + return String.join("|", stripped); + } + public void listen(TargetData targetData) { - Integer targetId = targetData.getTargetId(); - if (listenTargets.containsKey(targetId)) { + int sdkTargetId = targetData.getTargetId(); + RemoteTargetId remoteTargetId = targetIdMapSdkToRemote.get(sdkTargetId); + + if (remoteTargetId == null) { + TargetOrPipeline top = targetData.getTarget(); + for (Map.Entry entry : listenTargets.entrySet()) { + TargetOrPipeline activeTop = entry.getValue().getTarget(); + if (top.isTarget() && activeTop.isTarget()) { + if (top.target().equals(activeTop.target())) { + remoteTargetId = entry.getKey(); + targetIdMapSdkToRemote.put(sdkTargetId, remoteTargetId); + break; + } + } else if (top.isPipeline() && activeTop.isPipeline()) { + if (getPipelineCanonicalIdExceptSort( + top.pipeline$com_google_firebase_firebase_firestore()) + .equals( + getPipelineCanonicalIdExceptSort( + activeTop.pipeline$com_google_firebase_firebase_firestore()))) { + remoteTargetId = entry.getKey(); + targetIdMapSdkToRemote.put(sdkTargetId, remoteTargetId); + break; + } + } + } + } + + if (remoteTargetId != null && listenTargets.containsKey(remoteTargetId)) { return; } - listenTargets.put(targetId, targetData); + if (remoteTargetId != null) { + targetIdMapRemoteToSdk.remove(remoteTargetId); + } + remoteTargetId = RemoteTargetId.from(generateRemoteTargetId(sdkTargetId)); + targetIdMapSdkToRemote.put(sdkTargetId, remoteTargetId); + targetIdMapRemoteToSdk.put(remoteTargetId, sdkTargetId); + + TargetData remoteTargetData = + new TargetData( + targetData.getTarget(), + remoteTargetId.value(), + targetData.getSequenceNumber(), + targetData.getPurpose(), + targetData.getSnapshotVersion(), + targetData.getLastLimboFreeSnapshotVersion(), + targetData.getResumeToken(), + targetData.getExpectedCount()); + + listenTargets.put(remoteTargetId, remoteTargetData); if (shouldStartWatchStream()) { startWatchStream(); } else if (watchStream.isOpen()) { - sendWatchRequest(targetData); + sendWatchRequest(remoteTargetData); } } private void sendWatchRequest(TargetData targetData) { - watchChangeAggregator.recordPendingTargetRequest(targetData.getTargetId()); + RemoteTargetId remoteTargetId = RemoteTargetId.from(targetData.getTargetId()); + watchChangeAggregator.recordPendingTargetRequest(remoteTargetId.value()); if (!targetData.getResumeToken().isEmpty() || targetData.getSnapshotVersion().compareTo(SnapshotVersion.NONE) > 0) { - int expectedCount = this.getRemoteKeysForTarget(targetData.getTargetId()).size(); + int expectedCount = this.getRemoteKeysForTarget(remoteTargetId).size(); targetData = targetData.withExpectedCount(expectedCount); } @@ -396,14 +478,22 @@ private void sendWatchRequest(TargetData targetData) { *

If this is called with the last active targetId, the watch stream enters idle mode and will * be torn down after one minute of inactivity. */ - public void stopListening(int targetId) { - TargetData targetData = listenTargets.remove(targetId); + public void stopListening(int sdkTargetId) { + RemoteTargetId remoteTargetId = targetIdMapSdkToRemote.remove(sdkTargetId); + hardAssert( + remoteTargetId != null, + "stopListening called on target not currently watched: %d", + sdkTargetId); + targetIdMapRemoteToSdk.remove(remoteTargetId); + TargetData remoteTargetData = listenTargets.remove(remoteTargetId); hardAssert( - targetData != null, "stopListening called on target no currently watched: %d", targetId); + remoteTargetData != null, + "stopListening called on target not currently watched: %d", + sdkTargetId); // The watch stream might not be started if we're in a disconnected state if (watchStream.isOpen()) { - sendUnwatchRequest(targetId); + sendUnwatchRequest(remoteTargetId); } if (listenTargets.isEmpty()) { @@ -418,9 +508,9 @@ public void stopListening(int targetId) { } } - private void sendUnwatchRequest(int targetId) { - watchChangeAggregator.recordPendingTargetRequest(targetId); - watchStream.unwatchTarget(targetId); + private void sendUnwatchRequest(RemoteTargetId remoteTargetId) { + watchChangeAggregator.recordPendingTargetRequest(remoteTargetId.value()); + watchStream.unwatchTarget(remoteTargetId.value()); } /** @@ -539,17 +629,59 @@ private void raiseWatchSnapshot(SnapshotVersion snapshotVersion) { "Can't raise event for unknown SnapshotVersion"); RemoteEvent remoteEvent = watchChangeAggregator.createRemoteEvent(snapshotVersion); + Map duplicatedTargetChanges = new HashMap<>(); + for (Entry entry : remoteEvent.getTargetChanges().entrySet()) { + int sdkTargetId = entry.getKey(); + RemoteTargetId remoteTargetId = targetIdMapSdkToRemote.get(sdkTargetId); + if (remoteTargetId != null) { + for (Entry mapping : targetIdMapSdkToRemote.entrySet()) { + if (mapping.getValue().equals(remoteTargetId)) { + duplicatedTargetChanges.put(mapping.getKey(), entry.getValue()); + } + } + } else { + duplicatedTargetChanges.put(sdkTargetId, entry.getValue()); + } + } + + Map duplicatedTargetMismatches = new HashMap<>(); + for (Entry entry : remoteEvent.getTargetMismatches().entrySet()) { + int sdkTargetId = entry.getKey(); + RemoteTargetId remoteTargetId = targetIdMapSdkToRemote.get(sdkTargetId); + if (remoteTargetId != null) { + for (Entry mapping : targetIdMapSdkToRemote.entrySet()) { + if (mapping.getValue().equals(remoteTargetId)) { + duplicatedTargetMismatches.put(mapping.getKey(), entry.getValue()); + } + } + } else { + duplicatedTargetMismatches.put(sdkTargetId, entry.getValue()); + } + } + + remoteEvent = + new RemoteEvent( + remoteEvent.getSnapshotVersion(), + Collections.unmodifiableMap(duplicatedTargetChanges), + Collections.unmodifiableMap(duplicatedTargetMismatches), + remoteEvent.getDocumentUpdates(), + remoteEvent.getResolvedLimboDocuments()); + // Update in-memory resume tokens. LocalStore will update the persistent view of these when // applying the completed RemoteEvent. for (Entry entry : remoteEvent.getTargetChanges().entrySet()) { TargetChange targetChange = entry.getValue(); if (!targetChange.getResumeToken().isEmpty()) { - int targetId = entry.getKey(); - TargetData targetData = this.listenTargets.get(targetId); - // A watched target might have been removed already. - if (targetData != null) { - this.listenTargets.put( - targetId, targetData.withResumeToken(targetChange.getResumeToken(), snapshotVersion)); + int sdkTargetId = entry.getKey(); + RemoteTargetId remoteTargetId = targetIdMapSdkToRemote.get(sdkTargetId); + if (remoteTargetId != null) { + TargetData remoteTargetData = this.listenTargets.get(remoteTargetId); + // A watched target might have been removed already. + if (remoteTargetData != null) { + this.listenTargets.put( + remoteTargetId, + remoteTargetData.withResumeToken(targetChange.getResumeToken(), snapshotVersion)); + } } } } @@ -557,30 +689,35 @@ private void raiseWatchSnapshot(SnapshotVersion snapshotVersion) { // Re-establish listens for the targets that have been invalidated by existence filter // mismatches. for (Map.Entry entry : remoteEvent.getTargetMismatches().entrySet()) { - int targetId = entry.getKey(); - TargetData targetData = this.listenTargets.get(targetId); - // A watched target might have been removed already. - if (targetData != null) { - // Clear the resume token for the query, since we're in a known mismatch state. - this.listenTargets.put( - targetId, - targetData.withResumeToken(ByteString.EMPTY, targetData.getSnapshotVersion())); - - // Cause a hard reset by unwatching and rewatching immediately, but deliberately don't send - // a resume token so that we get a full update. - this.sendUnwatchRequest(targetId); - - // Mark the query we send as being on behalf of an existence filter mismatch, but don't - // actually retain that in listenTargets. This ensures that we flag the first re-listen this - // way without impacting future listens of this target (that might happen for example on - // reconnect). - TargetData requestTargetData = - new TargetData( - targetData.getTarget(), - targetId, - targetData.getSequenceNumber(), - /* purpose= */ entry.getValue()); - this.sendWatchRequest(requestTargetData); + int sdkTargetId = entry.getKey(); + RemoteTargetId remoteTargetId = targetIdMapSdkToRemote.get(sdkTargetId); + if (remoteTargetId != null) { + TargetData remoteTargetData = this.listenTargets.get(remoteTargetId); + // A watched target might have been removed already. + if (remoteTargetData != null) { + // Clear the resume token for the query, since we're in a known mismatch state. + this.listenTargets.put( + remoteTargetId, + remoteTargetData.withResumeToken( + ByteString.EMPTY, remoteTargetData.getSnapshotVersion())); + + // Cause a hard reset by unwatching and rewatching immediately, but deliberately don't + // send a resume token so that we get a full update. + this.sendUnwatchRequest(remoteTargetId); + + // Mark the query we send as being on behalf of an existence filter mismatch, but don't + // actually retain that in listenTargets. This ensures that we flag the first re-listen + // this way without impacting future listens of this target (that might happen for example + // on + // reconnect). + TargetData requestTargetData = + new TargetData( + remoteTargetData.getTarget(), + remoteTargetId.value(), + remoteTargetData.getSequenceNumber(), + /* purpose= */ entry.getValue()); + this.sendWatchRequest(requestTargetData); + } } } @@ -591,15 +728,31 @@ private void raiseWatchSnapshot(SnapshotVersion snapshotVersion) { private void processTargetError(WatchTargetChange targetChange) { hardAssert(targetChange.getCause() != null, "Processing target error without a cause"); for (Integer targetId : targetChange.getTargetIds()) { + RemoteTargetId remoteTargetId = RemoteTargetId.from(targetId); // Ignore targets that have been removed already. - if (listenTargets.containsKey(targetId)) { - listenTargets.remove(targetId); - watchChangeAggregator.removeTarget(targetId); - remoteStoreCallback.handleRejectedListen(targetId, targetChange.getCause()); + if (listenTargets.containsKey(remoteTargetId)) { + listenTargets.remove(remoteTargetId); + watchChangeAggregator.removeTarget(remoteTargetId.value()); + Integer sdkTargetId = targetIdMapRemoteToSdk.remove(remoteTargetId); + if (sdkTargetId != null) { + targetIdMapSdkToRemote.remove(sdkTargetId); + remoteStoreCallback.handleRejectedListen(sdkTargetId, targetChange.getCause()); + } } } } + @VisibleForTesting + public @Nullable RemoteTargetId getRemoteTargetId(int sdkTargetId) { + return targetIdMapSdkToRemote.get(sdkTargetId); + } + + @Override + public int getSdkTargetId(RemoteTargetId remoteTargetId) { + Integer sdkTargetId = targetIdMapRemoteToSdk.get(remoteTargetId); + return sdkTargetId != null ? sdkTargetId : remoteTargetId.value(); + } + // Write Stream /** @@ -759,14 +912,18 @@ public Transaction createTransaction() { } @Override - public ImmutableSortedSet getRemoteKeysForTarget(int targetId) { - return this.remoteStoreCallback.getRemoteKeysForTarget(targetId); + public ImmutableSortedSet getRemoteKeysForTarget(RemoteTargetId remoteTargetId) { + Integer sdkTargetId = targetIdMapRemoteToSdk.get(remoteTargetId); + if (sdkTargetId == null) { + return DocumentKey.emptyKeySet(); + } + return this.remoteStoreCallback.getRemoteKeysForTarget(sdkTargetId); } @Nullable @Override - public TargetData getTargetDataForTarget(int targetId) { - return this.listenTargets.get(targetId); + public TargetData getTargetDataForTarget(RemoteTargetId remoteTargetId) { + return this.listenTargets.get(remoteTargetId); } public Task> runAggregateQuery( diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteTargetId.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteTargetId.java new file mode 100644 index 00000000000..46c642746ed --- /dev/null +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteTargetId.java @@ -0,0 +1,60 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package com.google.firebase.firestore.remote; + +import androidx.annotation.NonNull; + +/** Represents a transient, session-specific target ID used strictly over the watch stream. */ +public final class RemoteTargetId implements Comparable { + private final int value; + + private RemoteTargetId(int value) { + this.value = value; + } + + public static RemoteTargetId from(int value) { + return new RemoteTargetId(value); + } + + public int value() { + return value; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return value == ((RemoteTargetId) o).value; + } + + @Override + public int hashCode() { + return value; + } + + @Override + public int compareTo(@NonNull RemoteTargetId other) { + return Integer.compare(value, other.value); + } + + @Override + public String toString() { + return "RemoteTargetId(" + value + ")"; + } +} diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/WatchChangeAggregator.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/WatchChangeAggregator.java index ead10fd0eeb..d36432d8c9d 100644 --- a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/WatchChangeAggregator.java +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/WatchChangeAggregator.java @@ -51,32 +51,38 @@ public interface TargetMetadataProvider { * Returns the set of remote document keys for the given target ID as of the last raised * snapshot or an empty set of document keys for unknown targets. */ - ImmutableSortedSet getRemoteKeysForTarget(int targetId); + ImmutableSortedSet getRemoteKeysForTarget(RemoteTargetId targetId); /** * Returns the TargetData for an active target ID or 'null' if this query is unknown or has * become inactive. */ @Nullable - TargetData getTargetDataForTarget(int targetId); + TargetData getTargetDataForTarget(RemoteTargetId targetId); + + /** + * Translates a RemoteTargetId to its stable SDK TargetId. Returns the remoteTargetId's value + * if no mapping exists. + */ + int getSdkTargetId(RemoteTargetId remoteTargetId); } private final TargetMetadataProvider targetMetadataProvider; /** The internal state of all tracked targets. */ - private final Map targetStates = new HashMap<>(); + private final Map targetStates = new HashMap<>(); /** Keeps track of the documents to update since the last raised snapshot. */ private Map pendingDocumentUpdates = new HashMap<>(); /** A mapping of document keys to their set of target IDs. */ - private Map> pendingDocumentTargetMapping = new HashMap<>(); + private Map> pendingDocumentTargetMapping = new HashMap<>(); /** * A map of targets with existence filter mismatches. These targets are known to be inconsistent * and their listens needs to be re-established by RemoteStore. */ - private Map pendingTargetResets = new HashMap<>(); + private Map pendingTargetResets = new HashMap<>(); private final DatabaseId databaseId; @@ -102,21 +108,23 @@ public void handleDocumentChange(DocumentChange documentChange) { DocumentKey documentKey = documentChange.getDocumentKey(); for (int targetId : documentChange.getUpdatedTargetIds()) { + RemoteTargetId remoteTargetId = RemoteTargetId.from(targetId); if (document != null && document.isFoundDocument()) { - addDocumentToTarget(targetId, document); + addDocumentToTarget(remoteTargetId, document); } else { - removeDocumentFromTarget(targetId, documentKey, document); + removeDocumentFromTarget(remoteTargetId, documentKey, document); } } for (int targetId : documentChange.getRemovedTargetIds()) { - removeDocumentFromTarget(targetId, documentKey, documentChange.getNewDocument()); + RemoteTargetId remoteTargetId = RemoteTargetId.from(targetId); + removeDocumentFromTarget(remoteTargetId, documentKey, documentChange.getNewDocument()); } } /** Processes and adds the WatchTargetChange to the current set of changes. */ public void handleTargetChange(WatchTargetChange targetChange) { - for (int targetId : getTargetIds(targetChange)) { + for (RemoteTargetId targetId : getTargetIds(targetChange)) { TargetState targetState = ensureTargetState(targetId); switch (targetChange.getChangeType()) { @@ -142,7 +150,7 @@ public void handleTargetChange(WatchTargetChange targetChange) { // We need to decrement the number of pending acks needed from watch for this targetId. targetState.recordTargetResponse(); if (!targetState.isPending()) { - removeTarget(targetId); + removeTarget(targetId.value()); } hardAssert( targetChange.getCause() == null, @@ -173,18 +181,16 @@ public void handleTargetChange(WatchTargetChange targetChange) { * Returns all targetIds that the watch change applies to: either the targetIds explicitly listed * in the change or the targetIds of all currently active targets. */ - private Collection getTargetIds(WatchTargetChange targetChange) { + private Collection getTargetIds(WatchTargetChange targetChange) { List targetIds = targetChange.getTargetIds(); if (!targetIds.isEmpty()) { - return targetIds; - } else { - List activeIds = new ArrayList<>(); - for (Integer id : targetStates.keySet()) { - if (isActiveTarget(id)) { - activeIds.add(id); - } + List result = new ArrayList<>(targetIds.size()); + for (int id : targetIds) { + result.add(RemoteTargetId.from(id)); } - return activeIds; + return result; + } else { + return targetStates.keySet(); } } @@ -193,7 +199,7 @@ private Collection getTargetIds(WatchTargetChange targetChange) { * invalidated by filter mismatches are added to `pendingTargetResets`. */ public void handleExistenceFilter(ExistenceFilterWatchChange watchChange) { - int targetId = watchChange.getTargetId(); + RemoteTargetId targetId = RemoteTargetId.from(watchChange.getTargetId()); int expectedCount = watchChange.getExistenceFilter().getCount(); TargetData targetData = queryDataForActiveTarget(targetId); @@ -285,7 +291,8 @@ private BloomFilterApplicationStatus applyBloomFilter( BloomFilter bloomFilter, ExistenceFilterWatchChange watchChange, int currentCount) { int expectedCount = watchChange.getExistenceFilter().getCount(); - int removedDocumentCount = this.filterRemovedDocuments(bloomFilter, watchChange.getTargetId()); + RemoteTargetId remoteTargetId = RemoteTargetId.from(watchChange.getTargetId()); + int removedDocumentCount = this.filterRemovedDocuments(bloomFilter, remoteTargetId); return (expectedCount == (currentCount - removedDocumentCount)) ? BloomFilterApplicationStatus.SUCCESS @@ -296,7 +303,7 @@ private BloomFilterApplicationStatus applyBloomFilter( * Filter out removed documents based on bloom filter membership result and return number of * documents removed. */ - private int filterRemovedDocuments(BloomFilter bloomFilter, int targetId) { + private int filterRemovedDocuments(BloomFilter bloomFilter, RemoteTargetId targetId) { ImmutableSortedSet existingKeys = targetMetadataProvider.getRemoteKeysForTarget(targetId); int removalCount = 0; @@ -323,8 +330,8 @@ private int filterRemovedDocuments(BloomFilter bloomFilter, int targetId) { public RemoteEvent createRemoteEvent(SnapshotVersion snapshotVersion) { Map targetChanges = new HashMap<>(); - for (Map.Entry entry : targetStates.entrySet()) { - int targetId = entry.getKey(); + for (Map.Entry entry : targetStates.entrySet()) { + RemoteTargetId targetId = entry.getKey(); TargetState targetState = entry.getValue(); TargetData targetData = queryDataForActiveTarget(targetId); @@ -343,7 +350,8 @@ public RemoteEvent createRemoteEvent(SnapshotVersion snapshotVersion) { } if (targetState.hasChanges()) { - targetChanges.put(targetId, targetState.toTargetChange()); + int sdkTargetId = targetMetadataProvider.getSdkTargetId(targetId); + targetChanges.put(sdkTargetId, targetState.toTargetChange()); targetState.clearChanges(); } } @@ -355,13 +363,14 @@ public RemoteEvent createRemoteEvent(SnapshotVersion snapshotVersion) { // that do not appear in the query cache. // // TODO(gsoltis): Expand on this comment once GC is available in the Android client. - for (Map.Entry> entry : pendingDocumentTargetMapping.entrySet()) { + for (Map.Entry> entry : + pendingDocumentTargetMapping.entrySet()) { DocumentKey key = entry.getKey(); - Set targets = entry.getValue(); + Set targets = entry.getValue(); boolean isOnlyLimboTarget = true; - for (int targetId : targets) { + for (RemoteTargetId targetId : targets) { TargetData targetData = queryDataForActiveTarget(targetId); if (targetData != null && !targetData.getPurpose().equals(QueryPurpose.LIMBO_RESOLUTION)) { isOnlyLimboTarget = false; @@ -378,11 +387,17 @@ public RemoteEvent createRemoteEvent(SnapshotVersion snapshotVersion) { document.setReadTime(snapshotVersion); } + Map translatedTargetMismatches = new HashMap<>(); + for (Map.Entry entry : pendingTargetResets.entrySet()) { + int sdkTargetId = targetMetadataProvider.getSdkTargetId(entry.getKey()); + translatedTargetMismatches.put(sdkTargetId, entry.getValue()); + } + RemoteEvent remoteEvent = new RemoteEvent( snapshotVersion, Collections.unmodifiableMap(targetChanges), - Collections.unmodifiableMap(pendingTargetResets), + Collections.unmodifiableMap(translatedTargetMismatches), Collections.unmodifiableMap(pendingDocumentUpdates), Collections.unmodifiableSet(resolvedLimboDocuments)); @@ -398,7 +413,7 @@ public RemoteEvent createRemoteEvent(SnapshotVersion snapshotVersion) { * Adds the provided document to the internal list of document updates and its document key to the * given target's mapping. */ - private void addDocumentToTarget(int targetId, MutableDocument document) { + private void addDocumentToTarget(RemoteTargetId targetId, MutableDocument document) { if (!isActiveTarget(targetId)) { return; } @@ -423,7 +438,7 @@ private void addDocumentToTarget(int targetId, MutableDocument document) { * provided to update the remote document cache. */ private void removeDocumentFromTarget( - int targetId, DocumentKey key, @Nullable MutableDocument updatedDocument) { + RemoteTargetId targetId, DocumentKey key, @Nullable MutableDocument updatedDocument) { if (!isActiveTarget(targetId)) { return; } @@ -445,7 +460,7 @@ private void removeDocumentFromTarget( } void removeTarget(int targetId) { - targetStates.remove(targetId); + targetStates.remove(RemoteTargetId.from(targetId)); } /** @@ -453,7 +468,7 @@ void removeTarget(int targetId) { * documents that the LocalStore considers to be part of the target as well as any accumulated * changes. */ - private int getCurrentDocumentCountForTarget(int targetId) { + private int getCurrentDocumentCountForTarget(RemoteTargetId targetId) { TargetState targetState = ensureTargetState(targetId); TargetChange targetChange = targetState.toTargetChange(); return (targetMetadataProvider.getRemoteKeysForTarget(targetId).size() @@ -467,11 +482,11 @@ private int getCurrentDocumentCountForTarget(int targetId) { */ void recordPendingTargetRequest(int targetId) { // For each request we get we need to record we need a response for it. - TargetState targetState = ensureTargetState(targetId); + TargetState targetState = ensureTargetState(RemoteTargetId.from(targetId)); targetState.recordPendingTargetRequest(); } - private TargetState ensureTargetState(int targetId) { + private TargetState ensureTargetState(RemoteTargetId targetId) { TargetState targetState = targetStates.get(targetId); if (targetState == null) { targetState = new TargetState(); @@ -481,8 +496,8 @@ private TargetState ensureTargetState(int targetId) { return targetState; } - private Set ensureDocumentTargetMapping(DocumentKey key) { - Set targetMapping = pendingDocumentTargetMapping.get(key); + private Set ensureDocumentTargetMapping(DocumentKey key) { + Set targetMapping = pendingDocumentTargetMapping.get(key); if (targetMapping == null) { targetMapping = new HashSet<>(); @@ -496,7 +511,7 @@ private Set ensureDocumentTargetMapping(DocumentKey key) { * Verifies that the user is still interested in this target (by calling * `getTargetDataForTarget()`) and that we are not waiting for pending ADDs from watch. */ - private boolean isActiveTarget(int targetId) { + private boolean isActiveTarget(RemoteTargetId targetId) { return queryDataForActiveTarget(targetId) != null; } @@ -505,7 +520,7 @@ private boolean isActiveTarget(int targetId) { * interested in that has no outstanding target change requests). */ @Nullable - private TargetData queryDataForActiveTarget(int targetId) { + private TargetData queryDataForActiveTarget(RemoteTargetId targetId) { TargetState targetState = targetStates.get(targetId); return targetState != null && targetState.isPending() ? null @@ -516,7 +531,7 @@ private TargetData queryDataForActiveTarget(int targetId) { * Resets the state of a Watch target to its initial state (sets 'current' to false, clears the * resume token and removes its target mapping from all documents). */ - private void resetTarget(int targetId) { + private void resetTarget(RemoteTargetId targetId) { hardAssert( targetStates.get(targetId) != null && !targetStates.get(targetId).isPending(), "Should only reset active targets"); @@ -532,7 +547,7 @@ private void resetTarget(int targetId) { } /** Returns whether the LocalStore considers the document to be part of the specified target. */ - private boolean targetContainsDocument(int targetId, DocumentKey key) { + private boolean targetContainsDocument(RemoteTargetId targetId, DocumentKey key) { ImmutableSortedSet existingKeys = targetMetadataProvider.getRemoteKeysForTarget(targetId); return existingKeys.contains(key); diff --git a/firebase-firestore/src/test/java/com/google/firebase/firestore/remote/MockDatastore.java b/firebase-firestore/src/test/java/com/google/firebase/firestore/remote/MockDatastore.java index 320a5edb1be..0c1908eb9bc 100644 --- a/firebase-firestore/src/test/java/com/google/firebase/firestore/remote/MockDatastore.java +++ b/firebase-firestore/src/test/java/com/google/firebase/firestore/remote/MockDatastore.java @@ -119,9 +119,12 @@ void writeWatchChange(WatchChange change, SnapshotVersion snapshotVersion) { // Technically removing an unknown target is valid (e.g. it could race with a // server-side removal), but we want to pay extra careful attention in tests // that we only remove targets we listened too. - throw new IllegalStateException("Removing a non-active target"); + if (!allowUnlistedTargetRemoval) { + throw new IllegalStateException("Removing a non-active target"); + } + } else { + activeTargets.remove(targetId); } - activeTargets.remove(targetId); } } if (!targetChange.getTargetIds().isEmpty()) { @@ -209,6 +212,8 @@ int getWritesSent() { } } + public boolean allowUnlistedTargetRemoval = false; + private MockWatchStream watchStream; private MockWriteStream writeStream; private int writeStreamRequestCount; diff --git a/firebase-firestore/src/test/java/com/google/firebase/firestore/spec/SpecTestCase.java b/firebase-firestore/src/test/java/com/google/firebase/firestore/spec/SpecTestCase.java index daab1c59f42..eca5203e452 100644 --- a/firebase-firestore/src/test/java/com/google/firebase/firestore/spec/SpecTestCase.java +++ b/firebase-firestore/src/test/java/com/google/firebase/firestore/spec/SpecTestCase.java @@ -59,7 +59,6 @@ import com.google.firebase.firestore.core.QueryListener; import com.google.firebase.firestore.core.QueryOrPipeline; import com.google.firebase.firestore.core.SyncEngine; -import com.google.firebase.firestore.core.Target; import com.google.firebase.firestore.core.TargetOrPipeline; import com.google.firebase.firestore.local.LocalStore; import com.google.firebase.firestore.local.LruDelegate; @@ -83,6 +82,7 @@ import com.google.firebase.firestore.remote.RemoteSerializer; import com.google.firebase.firestore.remote.RemoteStore; import com.google.firebase.firestore.remote.RemoteStore.RemoteStoreCallback; +import com.google.firebase.firestore.remote.RemoteTargetId; import com.google.firebase.firestore.remote.WatchChange; import com.google.firebase.firestore.remote.WatchChange.DocumentChange; import com.google.firebase.firestore.remote.WatchChange.ExistenceFilterWatchChange; @@ -222,6 +222,11 @@ public abstract class SpecTestCase implements RemoteStoreCallback { /** Set of expected active targets, keyed by target ID. */ private Map> expectedActiveTargets; + private Map> sdkToRemoteTargetIds; + private Map> sdkTargetIdMapExpectedToActual; + private Integer currentRemoteTargetIndex; + private boolean allowUnlistedTargetRemoval; + /** * The writes that have been sent to the SyncEngine via {@link SyncEngine#writeMutations} but not * yet acknowledged by calling receiveWriteAck/Error. They are tracked per-user. @@ -297,6 +302,7 @@ protected void specSetUp(JSONObject config) { this.useEagerGcForMemory = config.optBoolean("useEagerGCForMemory", true); this.maxConcurrentLimboResolutions = config.optInt("maxConcurrentLimboResolutions", Integer.MAX_VALUE); + this.allowUnlistedTargetRemoval = config.optBoolean("allowUnlistedTargetRemoval", false); currentUser = User.UNAUTHENTICATED; databaseInfo = PersistenceTestHelpers.nextDatabaseInfo(); @@ -308,6 +314,10 @@ protected void specSetUp(JSONObject config) { initClient(); + sdkToRemoteTargetIds = new HashMap<>(); + sdkTargetIdMapExpectedToActual = new HashMap<>(); + currentRemoteTargetIndex = null; + // Set up internal event tracking for the spec tests. events = new ArrayList<>(); queryListeners = new HashMap<>(); @@ -333,6 +343,7 @@ protected void specTearDown() throws Exception { private void initClient() { queue = new AsyncQueue(); datastore = new MockDatastore(databaseInfo, queue); + datastore.allowUnlistedTargetRemoval = this.allowUnlistedTargetRemoval; ComponentProvider.Configuration configuration = new ComponentProvider.Configuration( @@ -614,8 +625,30 @@ private void doListen(JSONObject listenSpec) throws Exception { queue.runSync( () -> { int actualId = eventManager.addQueryListener(listener); - assertEquals(expectedId, actualId); + List actualIds = sdkTargetIdMapExpectedToActual.get(expectedId); + if (actualIds == null) { + actualIds = new ArrayList<>(); + sdkTargetIdMapExpectedToActual.put(expectedId, actualIds); + } + if (!actualIds.contains(actualId)) { + actualIds.add(actualId); + } + if (!usePipelineMode) { + assertEquals(expectedId, actualId); + } }); + + RemoteTargetId remoteTargetId = remoteStore.getRemoteTargetId(expectedId); + if (remoteTargetId != null) { + List remoteIds = sdkToRemoteTargetIds.get(expectedId); + if (remoteIds == null) { + remoteIds = new ArrayList<>(); + sdkToRemoteTargetIds.put(expectedId, remoteIds); + } + if (!remoteIds.contains(remoteTargetId.value())) { + remoteIds.add(remoteTargetId.value()); + } + } } private void doUnlisten(JSONArray unlistenSpec) throws Exception { @@ -643,7 +676,12 @@ private void doLoadBundle(String json) throws Exception { syncEngine.loadBundle(bundleReader, bundleTask); bundleTask.addOnFailureListener(e -> log("Loading bundle failed with " + e)); }); - assertTrue(bundleTask.isSuccessful()); + if (!bundleTask.isSuccessful()) { + if (bundleTask.getException() != null) { + bundleTask.getException().printStackTrace(); + } + Assert.fail("Bundle task was not successful"); + } } private void doMutation(Mutation mutation) throws Exception { @@ -709,14 +747,23 @@ private void writeWatchChange(WatchChange change, SnapshotVersion version) throw queue.runSync(() -> datastore.writeWatchChange(change, version)); } + private List getRemoteTargetIds(List sdkIds) { + List remoteIds = new ArrayList<>(sdkIds.size()); + for (int id : sdkIds) { + remoteIds.add(getRemoteTargetId(id)); + } + return remoteIds; + } + private void doWatchAck(JSONArray ackedTargets) throws Exception { WatchTargetChange change = - new WatchTargetChange(WatchTargetChangeType.Added, parseIntList(ackedTargets)); + new WatchTargetChange( + WatchTargetChangeType.Added, getRemoteTargetIds(parseIntList(ackedTargets))); writeWatchChange(change, SnapshotVersion.NONE); } private void doWatchCurrent(JSONArray currentSpec) throws Exception { - List currentTargets = parseIntList(currentSpec.getJSONArray(0)); + List currentTargets = getRemoteTargetIds(parseIntList(currentSpec.getJSONArray(0))); ByteString resumeToken = ByteString.copyFromUtf8(currentSpec.getString(1)); WatchTargetChange change = new WatchTargetChange(WatchTargetChangeType.Current, currentTargets, resumeToken); @@ -732,7 +779,8 @@ private void doWatchRemove(JSONObject watchRemoveSpec) throws Exception { error = Status.fromCodeValue(code); } } - List targetIds = parseIntList(watchRemoveSpec.getJSONArray("targetIds")); + List targetIds = + getRemoteTargetIds(parseIntList(watchRemoveSpec.getJSONArray("targetIds"))); WatchTargetChange change = new WatchTargetChange( WatchTargetChangeType.Removed, targetIds, WatchStream.EMPTY_RESUME_TOKEN, error); @@ -765,13 +813,15 @@ private void doWatchEntity(JSONObject watchEntity) throws Exception { !docSpec.isNull("value") ? parseMap(docSpec.getJSONObject("value")) : null; long version = docSpec.getLong("version"); MutableDocument doc = value != null ? doc(key, version, value) : deletedDoc(key, version); - List updated = parseIntList(watchEntity.optJSONArray("targets")); - List removed = parseIntList(watchEntity.optJSONArray("removedTargets")); + List updated = getRemoteTargetIds(parseIntList(watchEntity.optJSONArray("targets"))); + List removed = + getRemoteTargetIds(parseIntList(watchEntity.optJSONArray("removedTargets"))); WatchChange change = new DocumentChange(updated, removed, doc.getKey(), doc); writeWatchChange(change, SnapshotVersion.NONE); } else if (watchEntity.has("key")) { String key = watchEntity.getString("key"); - List removed = parseIntList(watchEntity.optJSONArray("removedTargets")); + List removed = + getRemoteTargetIds(parseIntList(watchEntity.optJSONArray("removedTargets"))); WatchChange change = new DocumentChange(Collections.emptyList(), removed, key(key), null); writeWatchChange(change, SnapshotVersion.NONE); } else { @@ -791,12 +841,13 @@ private void doWatchFilter(JSONObject watchFilter) throws Exception { : null; ExistenceFilter filter = new ExistenceFilter(keys.size(), bloomFilterProto); - ExistenceFilterWatchChange change = new ExistenceFilterWatchChange(targets.get(0), filter); + int targetId = getRemoteTargetId(targets.get(0)); + ExistenceFilterWatchChange change = new ExistenceFilterWatchChange(targetId, filter); writeWatchChange(change, SnapshotVersion.NONE); } private void doWatchReset(JSONArray targetIds) throws Exception { - List targets = parseIntList(targetIds); + List targets = getRemoteTargetIds(parseIntList(targetIds)); WatchChange change = new WatchTargetChange(WatchTargetChangeType.Reset, targets); writeWatchChange(change, SnapshotVersion.NONE); } @@ -804,10 +855,11 @@ private void doWatchReset(JSONArray targetIds) throws Exception { private void doWatchSnapshot(JSONObject watchSnapshot) throws Exception { // The client will only respond to watchSnapshots if they are on a target change with an empty // set of target IDs. - List targets = + List sdkTargets = watchSnapshot.has("targetIds") ? parseIntList(watchSnapshot.getJSONArray("targetIds")) : Collections.emptyList(); + List targets = getRemoteTargetIds(sdkTargets); String resumeToken = watchSnapshot.optString("resumeToken"); WatchChange change = new WatchTargetChange( @@ -936,6 +988,10 @@ private void doRestart() throws Exception { } private void doStep(JSONObject step) throws Exception { + if (step.length() == 0) { + return; + } + if (step.optInt("clientIndex", 0) != 0) { throw Assert.fail("The Android client does not support switching clients"); } @@ -974,6 +1030,8 @@ private void doStep(JSONObject step) throws Exception { doWatchSnapshot(step.getJSONObject("watchSnapshot")); } else if (step.has("watchStreamClose")) { doWatchStreamClose(step.getJSONObject("watchStreamClose")); + } else if (step.has("watchUsesTargetIndex")) { + doWatchUsesTargetIndex(step.get("watchUsesTargetIndex")); } else if (step.has("watchProto")) { // watchProto isn't yet used, and it's unclear how to create arbitrary protos from JSON. throw Assert.fail("watchProto is not yet supported."); @@ -1011,6 +1069,56 @@ private void doStep(JSONObject step) throws Exception { } } + private void doWatchUsesTargetIndex(Object value) throws Exception { + if (value instanceof Integer) { + currentRemoteTargetIndex = (Integer) value; + } else if (value instanceof String && ((String) value).equals("latest")) { + currentRemoteTargetIndex = null; + } else { + throw Assert.fail("watchUsesTargetIndex was not an integer or 'latest'"); + } + } + + private int getRemoteTargetId(int sdkTargetId) { + List actualIds = sdkTargetIdMapExpectedToActual.get(sdkTargetId); + int actualId = sdkTargetId; + if (actualIds != null && !actualIds.isEmpty()) { + if (currentRemoteTargetIndex != null && currentRemoteTargetIndex < actualIds.size()) { + actualId = actualIds.get(currentRemoteTargetIndex); + } else { + actualId = actualIds.get(actualIds.size() - 1); + } + } + + RemoteTargetId remoteTargetId = remoteStore.getRemoteTargetId(actualId); + List remoteIds = sdkToRemoteTargetIds.get(actualId); + if (remoteIds == null) { + remoteIds = new ArrayList<>(); + sdkToRemoteTargetIds.put(sdkTargetId, remoteIds); + } + if (remoteTargetId != null && !remoteIds.contains(remoteTargetId.value())) { + remoteIds.add(remoteTargetId.value()); + } + + if (currentRemoteTargetIndex != null) { + assertTrue( + "Index " + + currentRemoteTargetIndex + + " has not been generated yet (history: " + + remoteIds + + ")", + currentRemoteTargetIndex < remoteIds.size()); + return remoteIds.get(currentRemoteTargetIndex); + } + + if (remoteTargetId != null) { + return remoteTargetId.value(); + } + + assertTrue("No remote ID generated yet for target " + sdkTargetId, !remoteIds.isEmpty()); + return remoteIds.get(remoteIds.size() - 1); + } + // // Methods for validating expectations. // @@ -1167,12 +1275,9 @@ private void validateExpectedState(@Nullable JSONObject expectedState) throws JS if (usePipelineMode && !purpose.equals(QueryPurpose.LIMBO_RESOLUTION)) { targetData = new TargetData( - new TargetOrPipeline.TargetWrapper( - // We are specifically using the explicit orderBys for pipelines - // because these are the one used in query to pipeline conversions. - // Otherwise the tests will failed due to mismatched expected pipelines, - // despite them being semantically the same. - query.toTarget(query.getExplicitOrderBy())), + new TargetOrPipeline.PipelineWrapper( + query.toRealtimePipeline( + db, new UserDataReader(databaseInfo.getDatabaseId()))), targetId, ARBITRARY_SEQUENCE_NUMBER, purpose); @@ -1313,52 +1418,85 @@ private void validateActiveTargets() { return; } - // Create a copy so we can modify it in tests - Map actualTargets = new HashMap<>(datastore.activeTargets()); + // Create a copy and map remote target IDs to SDK target IDs + Map actualTargets = new HashMap<>(); + for (Map.Entry entry : datastore.activeTargets().entrySet()) { + int remoteTargetId = entry.getKey(); + Integer sdkTargetId = remoteStore.getSdkTargetId(RemoteTargetId.from(remoteTargetId)); + if (sdkTargetId != null) { + TargetData remoteTargetData = entry.getValue(); + TargetData sdkTargetData = + new TargetData( + remoteTargetData.getTarget(), + sdkTargetId, + remoteTargetData.getSequenceNumber(), + remoteTargetData.getPurpose(), + remoteTargetData.getSnapshotVersion(), + remoteTargetData.getLastLimboFreeSnapshotVersion(), + remoteTargetData.getResumeToken(), + remoteTargetData.getExpectedCount()); + actualTargets.put(sdkTargetId, sdkTargetData); + } + } for (Map.Entry> expected : expectedActiveTargets.entrySet()) { - assertTrue( - "Expected active target not found: " + expected.getValue(), - actualTargets.containsKey(expected.getKey())); - - List expectedQueries = expected.getValue(); - TargetData expectedTarget = expectedQueries.get(0); - TargetData actualTarget = actualTargets.get(expected.getKey()); - - // TODO: Replace the assertEquals() checks on the individual properties of TargetData below - // with the single assertEquals on the TargetData objects themselves if the sequenceNumber is - // ever made to be consistent. - // assertEquals(expectedTarget, actualTarget); - assertEquals(expectedTarget.getPurpose(), actualTarget.getPurpose()); - if (usePipelineMode && !expectedTarget.getPurpose().equals(QueryPurpose.LIMBO_RESOLUTION)) { - Target target = expectedTarget.getTarget().target(); - assertEquals( - new TargetOrPipeline.PipelineWrapper( - new Query( - target.getPath(), - target.getCollectionGroup(), - target.getFilters(), - target.getOrderBy(), - target.getLimit(), - Query.LimitType.LIMIT_TO_FIRST, - target.getStartAt(), - target.getEndAt()) - .toRealtimePipeline(db, new UserDataReader(databaseInfo.getDatabaseId()))), - actualTarget.getTarget()); - } else { - assertEquals(expectedTarget.getTarget(), actualTarget.getTarget()); + int expectedId = expected.getKey(); + List actualIds = sdkTargetIdMapExpectedToActual.get(expectedId); + if (actualIds == null || actualIds.isEmpty()) { + actualIds = Collections.singletonList(expectedId); } - assertEquals(expectedTarget.getTargetId(), actualTarget.getTargetId()); - assertEquals(expectedTarget.getSnapshotVersion(), actualTarget.getSnapshotVersion()); - assertEquals( - expectedTarget.getResumeToken().toStringUtf8(), - actualTarget.getResumeToken().toStringUtf8()); - if (expectedTarget.getExpectedCount() != null) { - assertEquals(expectedTarget.getExpectedCount(), actualTarget.getExpectedCount()); - } + for (int actualId : actualIds) { + if (actualTargets.containsKey(actualId)) { + List expectedQueries = expected.getValue(); + TargetData expectedTarget = expectedQueries.get(0); + TargetData actualTarget = actualTargets.get(actualId); + + // TODO: Replace the assertEquals() checks on the individual properties of TargetData + // below + // with the single assertEquals on the TargetData objects themselves if the sequenceNumber + // is + // ever made to be consistent. + // assertEquals(expectedTarget, actualTarget); + assertEquals(expectedTarget.getPurpose(), actualTarget.getPurpose()); + if (usePipelineMode + && !expectedTarget.getPurpose().equals(QueryPurpose.LIMBO_RESOLUTION)) { + boolean matched = false; + for (TargetData expTarget : expectedQueries) { + if (expTarget.getTarget().equals(actualTarget.getTarget())) { + matched = true; + break; + } + } + assertTrue( + "Expected pipeline " + + actualTarget.getTarget() + + " not found in expected active list: " + + expectedQueries, + matched); + } else { + assertEquals(expectedTarget.getTarget(), actualTarget.getTarget()); + } + int expectedTargetId = expectedTarget.getTargetId(); + List expActualIds = sdkTargetIdMapExpectedToActual.get(expectedTargetId); + if (expActualIds == null) { + expActualIds = Collections.singletonList(expectedTargetId); + } + assertTrue( + "Expected target ID mapping not found for " + expectedTargetId, + expActualIds.contains(actualTarget.getTargetId())); + assertEquals(expectedTarget.getSnapshotVersion(), actualTarget.getSnapshotVersion()); + assertEquals( + expectedTarget.getResumeToken().toStringUtf8(), + actualTarget.getResumeToken().toStringUtf8()); + + if (expectedTarget.getExpectedCount() != null) { + assertEquals(expectedTarget.getExpectedCount(), actualTarget.getExpectedCount()); + } - actualTargets.remove(expected.getKey()); + actualTargets.remove(actualId); + } + } } assertTrue("Unexpected active targets: " + actualTargets, actualTargets.isEmpty()); diff --git a/firebase-firestore/src/test/resources/json/bundle_spec_test.json b/firebase-firestore/src/test/resources/json/bundle_spec_test.json index 53d26b5dce1..a730d3191d9 100644 --- a/firebase-firestore/src/test/resources/json/bundle_spec_test.json +++ b/firebase-firestore/src/test/resources/json/bundle_spec_test.json @@ -27,10 +27,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 4 @@ -55,10 +53,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -68,10 +64,8 @@ "4": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -104,10 +98,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -121,10 +113,8 @@ "4": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -145,8 +135,7 @@ "c" ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "targetId": 6 @@ -178,8 +167,7 @@ "c" ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -189,10 +177,8 @@ "4": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -209,8 +195,7 @@ "c" ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -239,10 +224,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 4 @@ -267,10 +250,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -280,10 +261,8 @@ "4": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -314,10 +293,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -327,10 +304,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -379,8 +354,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 250 }, "expectedSnapshotEvents": [ @@ -403,10 +377,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -420,10 +392,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -448,10 +418,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -461,10 +429,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -496,10 +462,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -526,10 +490,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -539,10 +501,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -591,8 +551,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 250 }, "expectedSnapshotEvents": [ @@ -615,10 +574,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -632,10 +589,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -660,10 +615,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -673,10 +626,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -712,10 +663,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -744,10 +693,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -774,10 +721,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -787,10 +732,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -839,8 +782,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 250 }, "expectedSnapshotEvents": [ @@ -863,10 +805,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -903,10 +843,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -917,8 +855,7 @@ "Newer deleted docs from bundles should delete cached docs": { "describeName": "Bundles:", "itName": "Newer deleted docs from bundles should delete cached docs", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -927,10 +864,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -940,10 +875,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -988,8 +921,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -1012,10 +944,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -1029,10 +959,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -1057,8 +985,7 @@ "Newer docs from bundles might lead to limbo doc": { "describeName": "Bundles:", "itName": "Newer docs from bundles might lead to limbo doc", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -1067,10 +994,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -1080,10 +1005,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -1099,8 +1022,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -1116,8 +1038,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 250 }, "expectedSnapshotEvents": [ @@ -1126,10 +1047,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -1157,10 +1076,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -1173,10 +1090,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" } ], @@ -1186,10 +1101,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -1205,8 +1118,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 1 ] @@ -1222,8 +1134,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1002 }, "expectedSnapshotEvents": [ @@ -1232,10 +1143,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -1255,16 +1164,13 @@ } ], "expectedState": { - "activeLimboDocs": [ - ], + "activeLimboDocs": [], "activeTargets": { "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -1278,8 +1184,7 @@ "Newer docs from bundles should keep not raise snapshot if there are unacknowledged writes": { "describeName": "Bundles:", "itName": "Newer docs from bundles should keep not raise snapshot if there are unacknowledged writes", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -1288,10 +1193,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -1301,10 +1204,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -1349,8 +1250,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 250 }, "expectedSnapshotEvents": [ @@ -1373,10 +1273,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -1409,10 +1307,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -1426,8 +1322,7 @@ "Newer docs from bundles should overwrite cache": { "describeName": "Bundles:", "itName": "Newer docs from bundles should overwrite cache", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -1436,10 +1331,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -1449,10 +1342,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -1497,8 +1388,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -1521,10 +1411,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -1552,10 +1440,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -1566,8 +1452,7 @@ "Newer docs from bundles should raise snapshot only when Watch catches up with acknowledged writes": { "describeName": "Bundles:", "itName": "Newer docs from bundles should raise snapshot only when Watch catches up with acknowledged writes", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -1576,10 +1461,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -1589,10 +1472,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -1637,8 +1518,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 250 }, "expectedSnapshotEvents": [ @@ -1661,10 +1541,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -1697,10 +1575,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -1715,8 +1591,7 @@ "acknowledgedDocs": [ "collection/a" ], - "rejectedDocs": [ - ] + "rejectedDocs": [] } } }, @@ -1745,10 +1620,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -1759,8 +1632,7 @@ "Older deleted docs from bundles should do nothing": { "describeName": "Bundles:", "itName": "Older deleted docs from bundles should do nothing", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -1769,10 +1641,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -1782,10 +1652,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -1830,8 +1698,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -1854,10 +1721,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -1868,4 +1733,4 @@ } ] } -} +} \ No newline at end of file diff --git a/firebase-firestore/src/test/resources/json/existence_filter_spec_test.json b/firebase-firestore/src/test/resources/json/existence_filter_spec_test.json index cf0d49885d2..dca15377f62 100644 --- a/firebase-firestore/src/test/resources/json/existence_filter_spec_test.json +++ b/firebase-firestore/src/test/resources/json/existence_filter_spec_test.json @@ -4908,6 +4908,9 @@ } } }, + { + "watchUsesTargetIndex": 0 + }, { "watchFilter": { "keys": [ @@ -4924,6 +4927,9 @@ ] } }, + { + "watchUsesTargetIndex": "latest" + }, { "watchAck": [ 2 diff --git a/firebase-firestore/src/test/resources/json/limbo_spec_test.json b/firebase-firestore/src/test/resources/json/limbo_spec_test.json index 19cdbaa2195..52432396036 100644 --- a/firebase-firestore/src/test/resources/json/limbo_spec_test.json +++ b/firebase-firestore/src/test/resources/json/limbo_spec_test.json @@ -2,8 +2,7 @@ "A limbo resolution for a document should be removed from the queue when the last query listen stops": { "describeName": "Limbo Documents:", "itName": "A limbo resolution for a document should be removed from the queue when the last query listen stops", - "tags": [ - ], + "tags": [], "config": { "maxConcurrentLimboResolutions": 1, "numClients": 1, @@ -13,10 +12,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1" }, "targetId": 2 @@ -26,10 +23,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1" } ], @@ -74,8 +69,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -98,10 +92,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1" } } @@ -111,16 +103,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -133,8 +122,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection1" }, "targetId": 4 @@ -166,8 +154,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection1" } } @@ -184,8 +171,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection1" } ], @@ -201,8 +187,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 4 ] @@ -218,8 +203,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1001 }, "expectedState": { @@ -230,10 +214,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1/doc" } ], @@ -250,8 +232,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection1" } ], @@ -263,10 +244,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection2" }, "targetId": 6 @@ -276,10 +255,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1/doc" } ], @@ -296,8 +273,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection1" } ], @@ -306,10 +282,8 @@ "6": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection2" } ], @@ -354,8 +328,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1002 }, "expectedSnapshotEvents": [ @@ -378,10 +351,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection2" } } @@ -391,10 +362,8 @@ "userUnlisten": [ 6, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection2" } ], @@ -403,10 +372,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1/doc" } ], @@ -423,8 +390,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection1" } ], @@ -443,8 +409,7 @@ 2 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection2" }, "targetId": 8 @@ -476,8 +441,7 @@ 2 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection2" } } @@ -487,10 +451,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1/doc" } ], @@ -507,8 +469,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection1" } ], @@ -524,8 +485,7 @@ 2 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection2" } ], @@ -541,8 +501,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 8 ] @@ -558,8 +517,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1003 }, "expectedState": { @@ -570,10 +528,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1/doc" } ], @@ -590,8 +546,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection1" } ], @@ -607,8 +562,7 @@ 2 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection2" } ], @@ -630,8 +584,7 @@ 2 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection2" }, "targetId": 10 @@ -663,8 +616,7 @@ 2 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection2" } } @@ -674,10 +626,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1/doc" } ], @@ -694,8 +644,7 @@ 2 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection2" } ], @@ -711,8 +660,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection1" } ], @@ -728,8 +676,7 @@ 2 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection2" } ], @@ -745,8 +692,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 10 ] @@ -762,8 +708,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1004 }, "expectedState": { @@ -774,10 +719,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1/doc" } ], @@ -794,8 +737,7 @@ 2 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection2" } ], @@ -811,8 +753,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection1" } ], @@ -828,8 +769,7 @@ 2 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection2" } ], @@ -852,8 +792,7 @@ 2 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection2" } ], @@ -865,10 +804,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1/doc" } ], @@ -885,8 +822,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection1" } ], @@ -902,8 +838,7 @@ 2 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection2" } ], @@ -926,8 +861,7 @@ 2 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection2" } ], @@ -939,10 +873,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1/doc" } ], @@ -959,16 +891,14 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection1" } ], "resumeToken": "" } }, - "enqueuedLimboDocs": [ - ] + "enqueuedLimboDocs": [] } } ] @@ -976,8 +906,7 @@ "A limbo resolution for a document should not be enqueued if one is already enqueued": { "describeName": "Limbo Documents:", "itName": "A limbo resolution for a document should not be enqueued if one is already enqueued", - "tags": [ - ], + "tags": [], "config": { "maxConcurrentLimboResolutions": 1, "numClients": 1, @@ -987,10 +916,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1" }, "targetId": 2 @@ -1000,10 +927,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1" } ], @@ -1048,8 +973,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -1072,10 +996,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1" } } @@ -1085,16 +1007,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -1107,8 +1026,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection1" }, "targetId": 4 @@ -1140,8 +1058,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection1" } } @@ -1158,8 +1075,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection1" } ], @@ -1175,8 +1091,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 4 ] @@ -1192,8 +1107,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1001 }, "expectedState": { @@ -1204,10 +1118,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1/doc1" } ], @@ -1224,8 +1136,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection1" } ], @@ -1237,10 +1148,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection2" }, "targetId": 6 @@ -1250,10 +1159,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1/doc1" } ], @@ -1270,8 +1177,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection1" } ], @@ -1280,10 +1186,8 @@ "6": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection2" } ], @@ -1328,8 +1232,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1002 }, "expectedSnapshotEvents": [ @@ -1352,10 +1255,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection2" } } @@ -1365,10 +1266,8 @@ "userUnlisten": [ 6, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection2" } ], @@ -1377,10 +1276,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1/doc1" } ], @@ -1397,8 +1294,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection1" } ], @@ -1417,8 +1313,7 @@ 2 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection2" }, "targetId": 8 @@ -1450,8 +1345,7 @@ 2 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection2" } } @@ -1461,10 +1355,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1/doc1" } ], @@ -1481,8 +1373,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection1" } ], @@ -1498,8 +1389,7 @@ 2 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection2" } ], @@ -1515,8 +1405,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 8 ] @@ -1532,8 +1421,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1003 }, "expectedState": { @@ -1544,10 +1432,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1/doc1" } ], @@ -1564,8 +1450,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection1" } ], @@ -1581,8 +1466,7 @@ 2 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection2" } ], @@ -1604,8 +1488,7 @@ 2 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection2" }, "targetId": 10 @@ -1637,8 +1520,7 @@ 2 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection2" } } @@ -1648,10 +1530,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1/doc1" } ], @@ -1668,8 +1548,7 @@ 2 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection2" } ], @@ -1685,8 +1564,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection1" } ], @@ -1702,8 +1580,7 @@ 2 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection2" } ], @@ -1719,8 +1596,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 10 ] @@ -1736,8 +1612,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1004 }, "expectedState": { @@ -1748,10 +1623,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1/doc1" } ], @@ -1768,8 +1641,7 @@ 2 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection2" } ], @@ -1785,8 +1657,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection1" } ], @@ -1802,8 +1673,7 @@ 2 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection2" } ], @@ -1820,8 +1690,7 @@ "A limbo resolution for a document should not be started if one is already active": { "describeName": "Limbo Documents:", "itName": "A limbo resolution for a document should not be started if one is already active", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -1830,10 +1699,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -1843,10 +1710,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -1891,8 +1756,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -1915,10 +1779,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -1928,16 +1790,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -1950,8 +1809,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "targetId": 4 @@ -1983,8 +1841,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -2001,8 +1858,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -2018,8 +1874,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 4 ] @@ -2035,8 +1890,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1001 }, "expectedState": { @@ -2047,10 +1901,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/doc" } ], @@ -2067,16 +1919,14 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], "resumeToken": "" } }, - "enqueuedLimboDocs": [ - ] + "enqueuedLimboDocs": [] } }, { @@ -2089,8 +1939,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "targetId": 6 @@ -2122,8 +1971,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -2133,10 +1981,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/doc" } ], @@ -2153,8 +1999,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -2170,8 +2015,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -2187,8 +2031,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 6 ] @@ -2204,8 +2047,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1002 }, "expectedState": { @@ -2216,10 +2058,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/doc" } ], @@ -2236,8 +2076,7 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -2253,16 +2092,14 @@ 1 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], "resumeToken": "" } }, - "enqueuedLimboDocs": [ - ] + "enqueuedLimboDocs": [] } } ] @@ -2270,8 +2107,7 @@ "Document remove message will cause docs to go in limbo": { "describeName": "Limbo Documents:", "itName": "Document remove message will cause docs to go in limbo", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -2280,10 +2116,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -2293,10 +2127,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -2353,8 +2185,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1002 }, "expectedSnapshotEvents": [ @@ -2389,10 +2220,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -2408,8 +2237,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1003 }, "expectedSnapshotEvents": [ @@ -2418,10 +2246,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -2434,10 +2260,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/b" } ], @@ -2447,10 +2271,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -2474,8 +2296,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1004 }, "expectedSnapshotEvents": [ @@ -2484,10 +2305,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -2507,16 +2326,13 @@ } ], "expectedState": { - "activeLimboDocs": [ - ], + "activeLimboDocs": [], "activeTargets": { "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -2530,8 +2346,7 @@ "Failed limbo resolution removes document from view": { "describeName": "Limbo Documents:", "itName": "Failed limbo resolution removes document from view", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -2547,8 +2362,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -2565,8 +2379,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -2611,8 +2424,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -2642,8 +2454,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -2684,8 +2495,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -2702,23 +2512,19 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 4 @@ -2744,10 +2550,8 @@ "fromCache": true, "hasPendingWrites": true, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -2757,10 +2561,8 @@ "4": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -2776,8 +2578,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 4 ] @@ -2793,20 +2594,17 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1001 }, "expectedSnapshotEvents": [ { "errorCode": 0, "fromCache": false, - "hasPendingWrites": true, - "query": { - "filters": [ - ], - "orderBys": [ - ], + "hasPendingWrites": true, + "query": { + "filters": [], + "orderBys": [], "path": "collection" } } @@ -2838,10 +2636,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -2854,10 +2650,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" } ], @@ -2867,10 +2661,8 @@ "4": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -2878,8 +2670,7 @@ } }, "userCallbacks": { - "acknowledgedDocs": [ - ], + "acknowledgedDocs": [], "rejectedDocs": [ "collection/a" ] @@ -2901,10 +2692,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -2924,16 +2713,13 @@ } ], "expectedState": { - "activeLimboDocs": [ - ], + "activeLimboDocs": [], "activeTargets": { "4": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -2959,10 +2745,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -2972,10 +2756,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -3034,8 +2816,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1001 }, "expectedSnapshotEvents": [ @@ -3072,10 +2853,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -3099,8 +2878,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1002 }, "expectedSnapshotEvents": [ @@ -3109,10 +2887,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -3125,10 +2901,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/c" } ], @@ -3138,10 +2912,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -3164,8 +2936,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "targetId": 4 @@ -3198,8 +2969,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -3209,10 +2979,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/c" } ], @@ -3222,10 +2990,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -3241,8 +3007,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -3263,10 +3028,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/c" } ], @@ -3276,10 +3039,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -3295,8 +3056,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -3400,8 +3160,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1010 }, "expectedSnapshotEvents": [ @@ -3425,10 +3184,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } }, @@ -3459,8 +3216,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -3502,8 +3258,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1101 }, "expectedSnapshotEvents": [ @@ -3512,10 +3267,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -3546,8 +3299,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "removed": [ @@ -3568,16 +3320,13 @@ } ], "expectedState": { - "activeLimboDocs": [ - ], + "activeLimboDocs": [], "activeTargets": { "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -3593,8 +3342,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -3620,10 +3368,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -3633,10 +3379,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -3695,8 +3439,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1001 }, "expectedSnapshotEvents": [ @@ -3733,10 +3476,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -3760,8 +3501,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1002 }, "expectedSnapshotEvents": [ @@ -3770,10 +3510,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -3786,10 +3524,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/c" } ], @@ -3799,10 +3535,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -3825,8 +3559,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "targetId": 4 @@ -3859,8 +3592,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -3870,10 +3602,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/c" } ], @@ -3883,10 +3613,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -3902,8 +3630,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -3959,10 +3686,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/c" } ], @@ -3972,10 +3697,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -3991,8 +3714,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -4096,8 +3818,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1010 }, "expectedSnapshotEvents": [ @@ -4121,10 +3842,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -4170,8 +3889,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "removed": [ @@ -4192,16 +3910,13 @@ } ], "expectedState": { - "activeLimboDocs": [ - ], + "activeLimboDocs": [], "activeTargets": { "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -4217,8 +3932,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -4229,8 +3943,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1100 } } @@ -4251,10 +3964,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -4264,10 +3975,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -4326,8 +4035,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1001 }, "expectedSnapshotEvents": [ @@ -4364,10 +4072,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -4391,8 +4097,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1002 }, "expectedSnapshotEvents": [ @@ -4401,10 +4106,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -4417,10 +4120,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/c" } ], @@ -4430,10 +4131,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -4456,8 +4155,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "targetId": 4 @@ -4490,8 +4188,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -4501,10 +4198,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/c" } ], @@ -4514,10 +4209,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -4533,8 +4226,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -4577,10 +4269,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/c" } ], @@ -4590,10 +4280,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -4609,8 +4297,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -4714,8 +4401,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1010 }, "expectedSnapshotEvents": [ @@ -4739,10 +4425,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -4788,8 +4472,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "removed": [ @@ -4810,16 +4493,13 @@ } ], "expectedState": { - "activeLimboDocs": [ - ], + "activeLimboDocs": [], "activeTargets": { "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -4835,8 +4515,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -4847,8 +4526,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1100 } } @@ -4880,10 +4558,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -4893,10 +4569,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -4911,12 +4585,10 @@ "expectedState": { "activeTargets": { "2": { - "queries": [ - { - "filters": [ - ], - "orderBys": [ - ], + "queries": [ + { + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -4977,8 +4649,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1002 } }, @@ -5017,10 +4688,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5042,8 +4711,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1003 }, "expectedState": { @@ -5054,10 +4722,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/b" } ], @@ -5067,10 +4733,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5088,10 +4752,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5119,21 +4781,17 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1004 }, "expectedState": { - "activeLimboDocs": [ - ], + "activeLimboDocs": [], "activeTargets": { "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5151,10 +4809,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -5179,8 +4835,7 @@ "Limbo documents are deleted with an existence filter": { "describeName": "Limbo Documents:", "itName": "Limbo documents are deleted with an existence filter", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -5189,10 +4844,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -5202,10 +4855,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5250,8 +4901,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -5274,10 +4924,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5298,8 +4946,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1001 }, "expectedSnapshotEvents": [ @@ -5308,10 +4955,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5324,10 +4969,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" } ], @@ -5337,10 +4980,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5356,8 +4997,7 @@ }, { "watchFilter": { - "keys": [ - ], + "keys": [], "targetIds": [ 1 ] @@ -5373,8 +5013,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1002 }, "expectedSnapshotEvents": [ @@ -5383,10 +5022,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -5406,16 +5043,13 @@ } ], "expectedState": { - "activeLimboDocs": [ - ], + "activeLimboDocs": [], "activeTargets": { "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5429,8 +5063,7 @@ "Limbo documents are deleted without an existence filter": { "describeName": "Limbo Documents:", "itName": "Limbo documents are deleted without an existence filter", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -5439,10 +5072,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -5452,10 +5083,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5500,8 +5129,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -5524,10 +5152,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5548,8 +5174,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1001 }, "expectedSnapshotEvents": [ @@ -5558,10 +5183,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5574,10 +5197,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" } ], @@ -5587,10 +5208,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5614,8 +5233,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1002 }, "expectedSnapshotEvents": [ @@ -5624,10 +5242,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -5647,16 +5263,13 @@ } ], "expectedState": { - "activeLimboDocs": [ - ], + "activeLimboDocs": [], "activeTargets": { "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5693,10 +5306,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -5706,10 +5317,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5726,10 +5335,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5790,8 +5397,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000000 } }, @@ -5830,10 +5436,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5855,8 +5459,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000000 }, "expectedState": { @@ -5867,10 +5470,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/b" } ], @@ -5880,10 +5481,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5896,12 +5495,9 @@ "clientIndex": 0, "shutdown": true, "expectedState": { - "activeLimboDocs": [ - ], - "activeTargets": { - }, - "enqueuedLimboDocs": [ - ] + "activeLimboDocs": [], + "activeTargets": {}, + "enqueuedLimboDocs": [] } }, { @@ -5913,10 +5509,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5930,10 +5524,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5952,8 +5544,7 @@ { "clientIndex": 1, "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -5971,8 +5562,7 @@ { "clientIndex": 1, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 3000000 }, "expectedState": { @@ -5983,10 +5573,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/b" } ], @@ -5996,10 +5584,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -6026,8 +5612,7 @@ { "clientIndex": 1, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 4000000 }, "expectedSnapshotEvents": [ @@ -6036,10 +5621,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -6059,16 +5642,13 @@ } ], "expectedState": { - "activeLimboDocs": [ - ], + "activeLimboDocs": [], "activeTargets": { "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -6082,8 +5662,7 @@ "Limbo documents are resolved with updates": { "describeName": "Limbo Documents:", "itName": "Limbo documents are resolved with updates", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -6099,8 +5678,7 @@ "a" ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -6117,8 +5695,7 @@ "a" ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -6163,8 +5740,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -6194,8 +5770,7 @@ "a" ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -6216,8 +5791,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1001 }, "expectedSnapshotEvents": [ @@ -6233,8 +5807,7 @@ "a" ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -6247,10 +5820,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" } ], @@ -6267,8 +5838,7 @@ "a" ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -6313,8 +5883,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1002 }, "expectedSnapshotEvents": [ @@ -6330,8 +5899,7 @@ "a" ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "removed": [ @@ -6351,8 +5919,7 @@ } ], "expectedState": { - "activeLimboDocs": [ - ], + "activeLimboDocs": [], "activeTargets": { "2": { "queries": [ @@ -6364,8 +5931,7 @@ "a" ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -6379,8 +5945,7 @@ "Limbo documents are resolved with updates in different snapshot than \"current\"": { "describeName": "Limbo Documents:", "itName": "Limbo documents are resolved with updates in different snapshot than \"current\"", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -6396,8 +5961,7 @@ "a" ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -6414,8 +5978,7 @@ "a" ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -6460,8 +6023,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -6491,8 +6053,7 @@ "a" ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -6508,8 +6069,7 @@ "b" ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "targetId": 4 @@ -6526,8 +6086,7 @@ "a" ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -6543,8 +6102,7 @@ "b" ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -6568,8 +6126,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1001 }, "expectedSnapshotEvents": [ @@ -6585,8 +6142,7 @@ "a" ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -6599,10 +6155,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" } ], @@ -6619,8 +6173,7 @@ "a" ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -6636,8 +6189,7 @@ "b" ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -6688,8 +6240,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1002 }, "expectedSnapshotEvents": [ @@ -6705,8 +6256,7 @@ "a" ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "removed": [ @@ -6750,15 +6300,13 @@ "b" ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeLimboDocs": [ - ], + "activeLimboDocs": [], "activeTargets": { "2": { "queries": [ @@ -6770,8 +6318,7 @@ "a" ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -6787,8 +6334,7 @@ "b" ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -6807,8 +6353,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1003 } } @@ -6817,8 +6362,7 @@ "Limbo documents stay consistent between views": { "describeName": "Limbo Documents:", "itName": "Limbo documents stay consistent between views", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -6849,8 +6393,7 @@ "acknowledgedDocs": [ "collection/a" ], - "rejectedDocs": [ - ] + "rejectedDocs": [] } } }, @@ -6863,18 +6406,15 @@ "acknowledgedDocs": [ "collection/b" ], - "rejectedDocs": [ - ] + "rejectedDocs": [] } } }, { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -6911,10 +6451,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -6924,10 +6462,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -6972,8 +6508,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedState": { @@ -6984,10 +6519,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/b" } ], @@ -6997,10 +6530,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -7019,8 +6550,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "targetId": 4 @@ -7064,8 +6594,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -7075,10 +6604,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/b" } ], @@ -7088,10 +6615,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -7107,8 +6632,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -7121,16 +6645,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeLimboDocs": [ - ], + "activeLimboDocs": [], "activeTargets": { "4": { "queries": [ @@ -7142,8 +6663,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -7155,10 +6675,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -7195,10 +6713,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -7208,10 +6724,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -7227,8 +6741,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -7261,10 +6774,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -7274,10 +6785,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -7350,8 +6859,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000000 }, "expectedSnapshotEvents": [ @@ -7398,10 +6906,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -7428,8 +6934,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000000 }, "expectedSnapshotEvents": [ @@ -7438,10 +6943,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -7455,10 +6958,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/b" } ], @@ -7468,10 +6969,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -7480,10 +6979,8 @@ "3": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/c" } ], @@ -7507,10 +7004,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -7528,16 +7023,13 @@ "clientIndex": 0, "runTimer": "client_metadata_refresh", "expectedState": { - "activeLimboDocs": [ - ], + "activeLimboDocs": [], "activeTargets": { "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -7560,8 +7052,7 @@ { "clientIndex": 1, "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -7579,8 +7070,7 @@ { "clientIndex": 1, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 3000000 }, "expectedState": { @@ -7592,10 +7082,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/b" } ], @@ -7605,10 +7093,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -7617,10 +7103,8 @@ "3": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/c" } ], @@ -7648,8 +7132,7 @@ { "clientIndex": 1, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 3000000 }, "expectedState": { @@ -7660,10 +7143,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -7672,10 +7153,8 @@ "3": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/c" } ], @@ -7694,10 +7173,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -7727,10 +7204,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -7749,8 +7224,7 @@ { "clientIndex": 0, "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -7768,8 +7242,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 5000000 }, "expectedState": { @@ -7780,10 +7253,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -7792,10 +7263,8 @@ "5": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/c" } ], @@ -7823,8 +7292,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 6000000 }, "expectedSnapshotEvents": [ @@ -7833,10 +7301,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -7856,16 +7322,13 @@ } ], "expectedState": { - "activeLimboDocs": [ - ], + "activeLimboDocs": [], "activeTargets": { "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -7879,8 +7342,7 @@ "Limbo resolution handles snapshot before CURRENT": { "describeName": "Limbo Documents:", "itName": "Limbo resolution handles snapshot before CURRENT", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -7889,10 +7351,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -7902,10 +7362,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -7964,8 +7422,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -8002,10 +7459,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -8015,16 +7470,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -8039,8 +7491,7 @@ ], "limit": 1, "limitType": "LimitToFirst", - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "targetId": 4 @@ -8075,8 +7526,7 @@ ], "limit": 1, "limitType": "LimitToFirst", - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -8095,8 +7545,7 @@ ], "limit": 1, "limitType": "LimitToFirst", - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -8142,8 +7591,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -8161,8 +7609,7 @@ ], "limit": 1, "limitType": "LimitToFirst", - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -8205,8 +7652,7 @@ ], "limit": 1, "limitType": "LimitToFirst", - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "removed": [ @@ -8234,10 +7680,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/b" } ], @@ -8256,8 +7700,7 @@ ], "limit": 1, "limitType": "LimitToFirst", - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -8295,8 +7738,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, @@ -8310,8 +7752,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 3000 } }, @@ -8361,8 +7802,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 4000 }, "expectedSnapshotEvents": [ @@ -8380,15 +7820,13 @@ ], "limit": 1, "limitType": "LimitToFirst", - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeLimboDocs": [ - ], + "activeLimboDocs": [], "activeTargets": { "4": { "queries": [ @@ -8402,8 +7840,7 @@ ], "limit": 1, "limitType": "LimitToFirst", - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -8417,8 +7854,7 @@ "Limbo resolution handles snapshot before CURRENT [no document update]": { "describeName": "Limbo Documents:", "itName": "Limbo resolution handles snapshot before CURRENT [no document update]", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -8427,10 +7863,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -8440,10 +7874,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -8502,8 +7934,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -8540,10 +7971,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -8553,16 +7982,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -8577,8 +8003,7 @@ ], "limit": 1, "limitType": "LimitToFirst", - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "targetId": 4 @@ -8613,8 +8038,7 @@ ], "limit": 1, "limitType": "LimitToFirst", - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -8633,8 +8057,7 @@ ], "limit": 1, "limitType": "LimitToFirst", - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -8680,8 +8103,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -8699,8 +8121,7 @@ ], "limit": 1, "limitType": "LimitToFirst", - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -8743,8 +8164,7 @@ ], "limit": 1, "limitType": "LimitToFirst", - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "removed": [ @@ -8770,12 +8190,10 @@ ], "activeTargets": { "1": { - "queries": [ - { - "filters": [ - ], - "orderBys": [ - ], + "queries": [ + { + "filters": [], + "orderBys": [], "path": "collection/b" } ], @@ -8794,8 +8212,7 @@ ], "limit": 1, "limitType": "LimitToFirst", - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -8811,8 +8228,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, @@ -8826,8 +8242,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 3000 }, "expectedSnapshotEvents": [ @@ -8845,8 +8260,7 @@ ], "limit": 1, "limitType": "LimitToFirst", - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "removed": [ @@ -8867,8 +8281,7 @@ } ], "expectedState": { - "activeLimboDocs": [ - ], + "activeLimboDocs": [], "activeTargets": { "4": { "queries": [ @@ -8882,8 +8295,7 @@ ], "limit": 1, "limitType": "LimitToFirst", - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -8916,8 +8328,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 4000 } } @@ -8926,8 +8337,7 @@ "Limbo resolution should wait for full re-query result if there is an existence filter mismatch ": { "describeName": "Limbo Documents:", "itName": "Limbo resolution should wait for full re-query result if there is an existence filter mismatch ", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -8936,10 +8346,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -8949,10 +8357,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -9009,8 +8415,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -9045,10 +8450,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -9062,21 +8465,16 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeLimboDocs": [ - ], - "activeTargets": { - }, - "enqueuedLimboDocs": [ - ] + "activeLimboDocs": [], + "activeTargets": {}, + "enqueuedLimboDocs": [] } }, { @@ -9086,10 +8484,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -9123,8 +8519,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedState": { @@ -9132,10 +8527,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -9188,8 +8581,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 3000 }, "expectedState": { @@ -9200,10 +8592,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/b" } ], @@ -9213,10 +8603,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -9241,8 +8629,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 3000 }, "expectedSnapshotEvents": [ @@ -9251,10 +8638,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -9274,16 +8659,13 @@ } ], "expectedState": { - "activeLimboDocs": [ - ], + "activeLimboDocs": [], "activeTargets": { "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -9298,8 +8680,7 @@ "Limbo resolution throttling when a limbo listen is rejected.": { "describeName": "Limbo Documents:", "itName": "Limbo resolution throttling when a limbo listen is rejected.", - "tags": [ - ], + "tags": [], "config": { "maxConcurrentLimboResolutions": 1, "numClients": 1, @@ -9309,10 +8690,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -9322,10 +8701,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -9382,8 +8759,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -9418,10 +8794,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -9434,8 +8808,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -9451,8 +8824,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -9461,10 +8833,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -9477,10 +8847,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" } ], @@ -9490,10 +8858,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -9520,10 +8886,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -9550,10 +8914,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -9562,10 +8924,8 @@ "3": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/b" } ], @@ -9573,8 +8933,7 @@ "targetPurpose": "TargetPurposeLimboResolution" } }, - "enqueuedLimboDocs": [ - ] + "enqueuedLimboDocs": [] } }, { @@ -9592,10 +8951,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -9615,24 +8972,20 @@ } ], "expectedState": { - "activeLimboDocs": [ - ], + "activeLimboDocs": [], "activeTargets": { "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "resumeToken": "" } }, - "enqueuedLimboDocs": [ - ] + "enqueuedLimboDocs": [] } } ] @@ -9640,8 +8993,7 @@ "Limbo resolution throttling with all results at once from watch": { "describeName": "Limbo Documents:", "itName": "Limbo resolution throttling with all results at once from watch", - "tags": [ - ], + "tags": [], "config": { "maxConcurrentLimboResolutions": 2, "numClients": 1, @@ -9651,10 +9003,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -9664,10 +9014,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -9760,8 +9108,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -9832,10 +9179,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -9848,8 +9193,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -9865,8 +9209,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -9875,10 +9218,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -9892,10 +9233,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" } ], @@ -9905,10 +9244,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -9917,10 +9254,8 @@ "3": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/b" } ], @@ -9963,8 +9298,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2001 }, "expectedSnapshotEvents": [ @@ -9973,10 +9307,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -10016,10 +9348,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -10028,10 +9358,8 @@ "5": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/c" } ], @@ -10041,10 +9369,8 @@ "7": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/d" } ], @@ -10085,8 +9411,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2002 }, "expectedSnapshotEvents": [ @@ -10095,10 +9420,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -10137,10 +9460,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -10149,10 +9470,8 @@ "9": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/e" } ], @@ -10160,8 +9479,7 @@ "targetPurpose": "TargetPurposeLimboResolution" } }, - "enqueuedLimboDocs": [ - ] + "enqueuedLimboDocs": [] } }, { @@ -10179,8 +9497,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2003 }, "expectedSnapshotEvents": [ @@ -10189,10 +9506,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -10212,24 +9527,20 @@ } ], "expectedState": { - "activeLimboDocs": [ - ], + "activeLimboDocs": [], "activeTargets": { "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "resumeToken": "" } }, - "enqueuedLimboDocs": [ - ] + "enqueuedLimboDocs": [] } } ] @@ -10237,8 +9548,7 @@ "Limbo resolution throttling with bloom filter application": { "describeName": "Limbo Documents:", "itName": "Limbo resolution throttling with bloom filter application", - "tags": [ - ], + "tags": [], "config": { "maxConcurrentLimboResolutions": 2, "numClients": 1, @@ -10248,10 +9558,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -10261,10 +9569,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -10333,8 +9639,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -10381,10 +9686,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -10398,21 +9701,16 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeLimboDocs": [ - ], - "activeTargets": { - }, - "enqueuedLimboDocs": [ - ] + "activeLimboDocs": [], + "activeTargets": {}, + "enqueuedLimboDocs": [] } }, { @@ -10422,10 +9720,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -10513,8 +9809,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1001 }, "expectedSnapshotEvents": [ @@ -10561,10 +9856,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -10578,10 +9871,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a1" } ], @@ -10591,10 +9882,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -10603,10 +9892,8 @@ "3": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a2" } ], @@ -10624,8 +9911,7 @@ "Limbo resolution throttling with existence filter mismatch": { "describeName": "Limbo Documents:", "itName": "Limbo resolution throttling with existence filter mismatch", - "tags": [ - ], + "tags": [], "config": { "maxConcurrentLimboResolutions": 2, "numClients": 1, @@ -10635,10 +9921,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -10648,10 +9932,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -10720,8 +10002,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -10768,10 +10049,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -10785,21 +10064,16 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeLimboDocs": [ - ], - "activeTargets": { - }, - "enqueuedLimboDocs": [ - ] + "activeLimboDocs": [], + "activeTargets": {}, + "enqueuedLimboDocs": [] } }, { @@ -10809,10 +10083,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -10893,8 +10165,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1001 }, "expectedSnapshotEvents": [ @@ -10941,10 +10212,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -10954,10 +10223,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -11034,8 +10301,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1002 }, "expectedState": { @@ -11047,10 +10313,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a1" } ], @@ -11060,10 +10324,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -11073,10 +10335,8 @@ "3": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a2" } ], @@ -11117,8 +10377,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1003 }, "expectedSnapshotEvents": [ @@ -11127,10 +10386,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -11169,10 +10426,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -11182,10 +10437,8 @@ "5": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a3" } ], @@ -11193,8 +10446,7 @@ "targetPurpose": "TargetPurposeLimboResolution" } }, - "enqueuedLimboDocs": [ - ] + "enqueuedLimboDocs": [] } }, { @@ -11212,8 +10464,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1004 }, "expectedSnapshotEvents": [ @@ -11222,10 +10473,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -11245,16 +10494,13 @@ } ], "expectedState": { - "activeLimboDocs": [ - ], + "activeLimboDocs": [], "activeTargets": { "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -11262,8 +10508,7 @@ "targetPurpose": "TargetPurposeExistenceFilterMismatch" } }, - "enqueuedLimboDocs": [ - ] + "enqueuedLimboDocs": [] } } ] @@ -11271,8 +10516,7 @@ "Limbo resolution throttling with results one at a time from watch": { "describeName": "Limbo Documents:", "itName": "Limbo resolution throttling with results one at a time from watch", - "tags": [ - ], + "tags": [], "config": { "maxConcurrentLimboResolutions": 2, "numClients": 1, @@ -11282,10 +10526,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -11295,10 +10537,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -11391,8 +10631,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -11463,10 +10702,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -11479,8 +10716,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -11496,8 +10732,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -11506,10 +10741,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -11523,10 +10756,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" } ], @@ -11536,10 +10767,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -11548,10 +10777,8 @@ "3": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/b" } ], @@ -11586,8 +10813,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2001 }, "expectedSnapshotEvents": [ @@ -11596,10 +10822,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -11627,10 +10851,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -11639,10 +10861,8 @@ "3": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/b" } ], @@ -11652,10 +10872,8 @@ "5": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/c" } ], @@ -11684,8 +10902,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2002 }, "expectedSnapshotEvents": [ @@ -11694,10 +10911,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -11725,10 +10940,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -11737,10 +10950,8 @@ "5": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/c" } ], @@ -11750,10 +10961,8 @@ "7": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/d" } ], @@ -11781,8 +10990,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2003 }, "expectedSnapshotEvents": [ @@ -11791,10 +10999,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -11822,10 +11028,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -11834,10 +11038,8 @@ "7": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/d" } ], @@ -11847,10 +11049,8 @@ "9": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/e" } ], @@ -11858,8 +11058,7 @@ "targetPurpose": "TargetPurposeLimboResolution" } }, - "enqueuedLimboDocs": [ - ] + "enqueuedLimboDocs": [] } }, { @@ -11877,8 +11076,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2004 }, "expectedSnapshotEvents": [ @@ -11887,10 +11085,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -11917,10 +11113,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -11929,10 +11123,8 @@ "9": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/e" } ], @@ -11940,8 +11132,7 @@ "targetPurpose": "TargetPurposeLimboResolution" } }, - "enqueuedLimboDocs": [ - ] + "enqueuedLimboDocs": [] } }, { @@ -11954,8 +11145,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2005 }, "expectedSnapshotEvents": [ @@ -11964,10 +11154,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -11987,24 +11175,20 @@ } ], "expectedState": { - "activeLimboDocs": [ - ], + "activeLimboDocs": [], "activeTargets": { "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "resumeToken": "" } }, - "enqueuedLimboDocs": [ - ] + "enqueuedLimboDocs": [] } } ] @@ -12039,8 +11223,7 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], + "filters": [], "limit": 3, "limitType": "LimitToLast", "orderBys": [ @@ -12058,8 +11241,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 3, "limitType": "LimitToLast", "orderBys": [ @@ -12084,8 +11266,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 3, "limitType": "LimitToLast", "orderBys": [ @@ -12166,8 +11347,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 } }, @@ -12218,8 +11398,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 3, "limitType": "LimitToLast", "orderBys": [ @@ -12239,8 +11418,7 @@ }, { "clientIndex": 0, - "watchReset": [ - ] + "watchReset": [] }, { "clientIndex": 0, @@ -12300,8 +11478,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedState": { @@ -12312,10 +11489,8 @@ "1": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/c" } ], @@ -12325,8 +11500,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 3, "limitType": "LimitToLast", "orderBys": [ @@ -12352,8 +11526,7 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 3, "limitType": "LimitToLast", "orderBys": [ @@ -12399,8 +11572,7 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], + "filters": [], "limit": 3, "limitType": "LimitToLast", "orderBys": [ @@ -12418,8 +11590,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 3, "limitType": "LimitToLast", "orderBys": [ @@ -12444,8 +11615,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 3, "limitType": "LimitToLast", "orderBys": [ @@ -12526,8 +11696,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 } }, @@ -12578,8 +11747,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 3, "limitType": "LimitToLast", "orderBys": [ @@ -12599,8 +11767,7 @@ }, { "clientIndex": 0, - "watchReset": [ - ] + "watchReset": [] }, { "clientIndex": 0, @@ -12660,8 +11827,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, @@ -12714,8 +11880,7 @@ } ], "query": { - "filters": [ - ], + "filters": [], "limit": 3, "limitType": "LimitToLast", "orderBys": [ @@ -12747,14 +11912,12 @@ "clientIndex": 0, "drainQueue": true, "expectedState": { - "activeLimboDocs": [ - ], + "activeLimboDocs": [], "activeTargets": { "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 3, "limitType": "LimitToLast", "orderBys": [ @@ -12773,4 +11936,4 @@ } ] } -} +} \ No newline at end of file diff --git a/firebase-firestore/src/test/resources/json/listen_source_spec_test.json b/firebase-firestore/src/test/resources/json/listen_source_spec_test.json index e390612aaaf..984629be9eb 100644 --- a/firebase-firestore/src/test/resources/json/listen_source_spec_test.json +++ b/firebase-firestore/src/test/resources/json/listen_source_spec_test.json @@ -24,10 +24,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -37,10 +35,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -89,8 +85,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -113,10 +108,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -129,10 +122,8 @@ "source": "cache" }, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -157,10 +148,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -170,10 +159,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -190,10 +177,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -218,10 +203,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -231,10 +214,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -250,10 +231,8 @@ "source": "cache" }, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -278,10 +257,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -291,10 +268,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -332,8 +307,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -356,10 +330,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } }, @@ -382,10 +354,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -414,10 +384,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } }, @@ -440,10 +408,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -477,10 +443,8 @@ "source": "cache" }, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -505,33 +469,27 @@ "fromCache": true, "hasPendingWrites": true, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -543,8 +501,7 @@ "acknowledgedDocs": [ "collection/a" ], - "rejectedDocs": [ - ] + "rejectedDocs": [] } } }, @@ -554,33 +511,27 @@ "source": "cache" }, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 4 }, "expectedSnapshotEvents": [ { - "added": [ - ], + "added": [], "errorCode": 0, "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } } ] @@ -625,8 +576,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -670,15 +620,13 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -690,8 +638,7 @@ "acknowledgedDocs": [ "collection/a" ], - "rejectedDocs": [ - ] + "rejectedDocs": [] } } }, @@ -704,8 +651,7 @@ "acknowledgedDocs": [ "collection/b" ], - "rejectedDocs": [ - ] + "rejectedDocs": [] } } }, @@ -729,8 +675,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "removed": [ @@ -761,14 +706,12 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -780,8 +723,7 @@ "acknowledgedDocs": [ "collection/b" ], - "rejectedDocs": [ - ] + "rejectedDocs": [] } } }, @@ -791,49 +733,40 @@ "source": "cache" }, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 4 }, "expectedSnapshotEvents": [ { - "added": [ - ], + "added": [], "errorCode": 0, "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { "userUnlisten": [ 4, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } } ] @@ -841,8 +774,7 @@ "Doesn't include unknown documents in cached result": { "describeName": "Listens source options:", "itName": "Doesn't include unknown documents in cached result", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -870,10 +802,8 @@ "source": "cache" }, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -898,17 +828,14 @@ "fromCache": true, "hasPendingWrites": true, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } } ] @@ -916,8 +843,7 @@ "Doesn't raise 'hasPendingWrites' for deletes": { "describeName": "Listens source options:", "itName": "Doesn't raise 'hasPendingWrites' for deletes", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -926,10 +852,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -939,10 +863,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -987,8 +909,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -1011,10 +932,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -1024,16 +943,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -1049,10 +965,8 @@ "source": "cache" }, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -1077,17 +991,14 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -1098,10 +1009,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -1130,8 +1039,7 @@ "acknowledgedDocs": [ "collection/a" ], - "rejectedDocs": [ - ] + "rejectedDocs": [] } } } @@ -1140,8 +1048,7 @@ "Empty initial snapshot is raised from cache": { "describeName": "Listens source options:", "itName": "Empty initial snapshot is raised from cache", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -1150,10 +1057,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -1163,10 +1068,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -1182,8 +1085,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -1199,8 +1101,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -1209,10 +1110,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -1222,16 +1121,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -1247,10 +1143,8 @@ "source": "cache" }, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -1261,17 +1155,14 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } } ] @@ -1279,8 +1170,7 @@ "Empty-due-to-delete initial snapshot is raised from cache": { "describeName": "Listens source options:", "itName": "Empty-due-to-delete initial snapshot is raised from cache", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -1289,10 +1179,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -1302,10 +1190,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -1350,8 +1236,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -1374,10 +1259,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -1387,16 +1270,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -1415,10 +1295,8 @@ "source": "cache" }, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -1429,17 +1307,14 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } } ] @@ -1469,10 +1344,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -1482,10 +1355,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -1534,8 +1405,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -1558,10 +1428,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -1578,10 +1446,8 @@ "source": "cache" }, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -1606,17 +1472,14 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -1630,10 +1493,8 @@ "source": "cache" }, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -1658,17 +1519,14 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -1700,8 +1558,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -1724,10 +1581,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -1754,12 +1609,10 @@ ], "errorCode": 0, "fromCache": false, - "hasPendingWrites": false, - "query": { - "filters": [ - ], - "orderBys": [ - ], + "hasPendingWrites": false, + "query": { + "filters": [], + "orderBys": [], "path": "collection" } } @@ -1788,10 +1641,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -1806,16 +1657,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } } ] @@ -1848,33 +1696,27 @@ "source": "cache" }, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 }, "expectedSnapshotEvents": [ { - "added": [ - ], + "added": [], "errorCode": 0, "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -1888,33 +1730,27 @@ "source": "cache" }, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 }, "expectedSnapshotEvents": [ { - "added": [ - ], + "added": [], "errorCode": 0, "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -1949,10 +1785,8 @@ "fromCache": true, "hasPendingWrites": true, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -1981,10 +1815,8 @@ "fromCache": true, "hasPendingWrites": true, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -2018,8 +1850,7 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -2037,8 +1868,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -2107,8 +1937,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -2143,8 +1972,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -2169,8 +1997,7 @@ "source": "cache" }, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -2215,8 +2042,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -2230,8 +2056,7 @@ } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -2263,8 +2088,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -2287,8 +2111,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -2339,8 +2162,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -2395,10 +2217,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -2408,10 +2228,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -2484,8 +2302,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -2532,10 +2349,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -2546,16 +2361,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -2573,8 +2385,7 @@ "source": "cache" }, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -2619,8 +2430,7 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -2634,8 +2444,7 @@ } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -2649,8 +2458,7 @@ "source": "cache" }, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -2695,8 +2503,7 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -2710,8 +2517,7 @@ } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -2723,8 +2529,7 @@ "userUnlisten": [ 4, { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -2737,8 +2542,7 @@ } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -2773,8 +2577,7 @@ "fromCache": true, "hasPendingWrites": true, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -2829,10 +2632,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -2842,10 +2643,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -2918,8 +2717,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -2966,10 +2764,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -2980,16 +2776,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -3011,8 +2804,7 @@ "source": "cache" }, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -3057,8 +2849,7 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -3072,8 +2863,7 @@ } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -3083,8 +2873,7 @@ "source": "cache" }, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -3129,8 +2918,7 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -3144,8 +2932,7 @@ } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -3153,8 +2940,7 @@ "userUnlisten": [ 4, { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -3167,8 +2953,7 @@ } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -3199,8 +2984,7 @@ "fromCache": true, "hasPendingWrites": true, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -3260,8 +3044,7 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -3279,8 +3062,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -3305,8 +3087,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -3375,8 +3156,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 } }, @@ -3415,8 +3195,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -3441,8 +3220,7 @@ "source": "cache" }, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -3487,8 +3265,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -3506,8 +3283,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -3549,8 +3325,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -3573,8 +3348,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -3625,8 +3399,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -3659,8 +3432,7 @@ "Newer deleted docs from bundles should delete cached docs": { "describeName": "Listens source options:", "itName": "Newer deleted docs from bundles should delete cached docs", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -3669,10 +3441,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -3682,10 +3452,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -3730,8 +3498,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -3754,10 +3521,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -3767,16 +3532,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -3792,10 +3554,8 @@ "source": "cache" }, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -3820,17 +3580,14 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -3841,10 +3598,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -3869,8 +3624,7 @@ "Newer docs from bundles should keep not raise snapshot if there are unacknowledged writes": { "describeName": "Listens source options:", "itName": "Newer docs from bundles should keep not raise snapshot if there are unacknowledged writes", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -3879,10 +3633,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -3892,10 +3644,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -3940,8 +3690,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 250 }, "expectedSnapshotEvents": [ @@ -3964,10 +3713,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -3977,16 +3724,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -4002,10 +3746,8 @@ "source": "cache" }, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -4030,17 +3772,14 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -4070,10 +3809,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -4087,8 +3824,7 @@ "Newer docs from bundles should overwrite cache": { "describeName": "Listens source options:", "itName": "Newer docs from bundles should overwrite cache", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -4097,10 +3833,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -4110,10 +3844,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -4158,8 +3890,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -4182,10 +3913,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -4195,16 +3924,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -4220,10 +3946,8 @@ "source": "cache" }, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -4247,18 +3971,15 @@ "errorCode": 0, "fromCache": true, "hasPendingWrites": false, - "query": { - "filters": [ - ], - "orderBys": [ - ], + "query": { + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -4283,10 +4004,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -4297,8 +4016,7 @@ "Newer docs from bundles should raise snapshot only when Watch catches up with acknowledged writes": { "describeName": "Listens source options:", "itName": "Newer docs from bundles should raise snapshot only when Watch catches up with acknowledged writes", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -4307,10 +4025,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -4320,10 +4036,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -4368,8 +4082,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 250 }, "expectedSnapshotEvents": [ @@ -4392,10 +4105,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -4405,16 +4116,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -4430,10 +4138,8 @@ "source": "cache" }, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -4458,17 +4164,14 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -4498,10 +4201,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -4516,8 +4217,7 @@ "acknowledgedDocs": [ "collection/a" ], - "rejectedDocs": [ - ] + "rejectedDocs": [] } } }, @@ -4546,10 +4246,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -4560,8 +4258,7 @@ "Older deleted docs from bundles should do nothing": { "describeName": "Listens source options:", "itName": "Older deleted docs from bundles should do nothing", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -4570,10 +4267,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -4583,10 +4278,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -4631,8 +4324,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -4655,10 +4347,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -4668,16 +4358,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -4693,10 +4380,8 @@ "source": "cache" }, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -4721,17 +4406,14 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -4771,41 +4453,34 @@ "source": "cache" }, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 }, "expectedSnapshotEvents": [ { - "added": [ - ], + "added": [], "errorCode": 0, "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { "clientIndex": 0, "drainQueue": true, "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -4817,24 +4492,20 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { "clientIndex": 0, "drainQueue": true, "expectedState": { - "activeTargets": { - } + "activeTargets": {} } } ] @@ -4867,33 +4538,27 @@ "source": "cache" }, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 }, "expectedSnapshotEvents": [ { - "added": [ - ], + "added": [], "errorCode": 0, "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -4904,10 +4569,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -4917,10 +4580,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -4937,10 +4598,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -4980,8 +4639,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -5004,10 +4662,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5036,10 +4692,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5061,8 +4715,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -5071,10 +4724,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5089,10 +4740,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5136,33 +4785,27 @@ "source": "cache" }, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 }, "expectedSnapshotEvents": [ { - "added": [ - ], + "added": [], "errorCode": 0, "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -5173,10 +4816,8 @@ "clientIndex": 3, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -5186,10 +4827,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5206,10 +4845,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5258,8 +4895,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 } }, @@ -5290,10 +4926,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5322,10 +4956,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5358,10 +4990,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -5371,10 +5001,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5423,8 +5051,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -5447,10 +5074,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5467,10 +5092,8 @@ "source": "cache" }, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -5495,17 +5118,14 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -5517,16 +5137,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -5561,10 +5178,8 @@ "fromCache": false, "hasPendingWrites": true, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5575,16 +5190,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } } ] @@ -5592,8 +5204,7 @@ "onSnapshotsInSync fires for multiple listeners": { "describeName": "Listens source options:", "itName": "onSnapshotsInSync fires for multiple listeners", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -5602,10 +5213,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -5615,10 +5224,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5663,8 +5270,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -5687,10 +5293,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5700,16 +5304,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -5725,10 +5326,8 @@ "source": "cache" }, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -5753,17 +5352,14 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -5797,10 +5393,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5842,10 +5436,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5882,10 +5474,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5894,4 +5484,4 @@ } ] } -} +} \ No newline at end of file diff --git a/firebase-firestore/src/test/resources/json/listen_spec_test.json b/firebase-firestore/src/test/resources/json/listen_spec_test.json index b2810738225..08f2e44c337 100644 --- a/firebase-firestore/src/test/resources/json/listen_spec_test.json +++ b/firebase-firestore/src/test/resources/json/listen_spec_test.json @@ -2,8 +2,7 @@ "Array-contains queries support resuming": { "describeName": "Listens:", "itName": "Array-contains queries support resuming", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -19,8 +18,7 @@ 42 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -37,8 +35,7 @@ 42 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -54,8 +51,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -71,8 +67,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -88,8 +83,7 @@ 42 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -132,8 +126,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -168,8 +161,7 @@ 42 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -186,14 +178,12 @@ 42 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -213,8 +203,7 @@ 42 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -251,8 +240,7 @@ 42 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -269,8 +257,7 @@ 42 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -286,8 +273,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -303,8 +289,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 3000 }, "expectedSnapshotEvents": [ @@ -320,8 +305,7 @@ 42 ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -343,8 +327,7 @@ { "userListen": { "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -362,8 +345,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -383,8 +365,7 @@ { "userListen": { "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -402,8 +383,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -415,8 +395,7 @@ "path": "collection" }, { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -481,8 +460,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -517,8 +495,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -561,8 +538,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -580,8 +556,7 @@ "userUnlisten": [ 2, { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -598,8 +573,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -647,8 +621,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -671,8 +644,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -703,8 +675,7 @@ { "userListen": { "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -749,8 +720,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -768,8 +738,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -781,8 +750,7 @@ "path": "collection" }, { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -814,8 +782,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -832,8 +799,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -847,8 +813,7 @@ } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } } ] @@ -868,10 +833,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -881,10 +844,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -929,8 +890,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -953,10 +913,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -966,25 +924,20 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 4 @@ -994,10 +947,8 @@ "4": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -1011,8 +962,7 @@ "Contents of query update when new data is received.": { "describeName": "Listens:", "itName": "Contents of query update when new data is received.", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -1021,10 +971,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -1034,10 +982,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -1082,8 +1028,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -1106,10 +1051,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -1138,8 +1081,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -1162,10 +1104,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -1203,8 +1143,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -1221,8 +1160,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -1279,8 +1217,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -1310,8 +1247,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -1337,8 +1273,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "removed": [ @@ -1369,14 +1304,12 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -1389,8 +1322,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "targetId": 4 @@ -1407,8 +1339,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -1428,14 +1359,12 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -1447,8 +1376,7 @@ "acknowledgedDocs": [ "collection/a" ], - "rejectedDocs": [ - ] + "rejectedDocs": [] } } }, @@ -1461,18 +1389,15 @@ "acknowledgedDocs": [ "collection/b" ], - "rejectedDocs": [ - ] + "rejectedDocs": [] } } }, { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 6 @@ -1482,10 +1407,8 @@ "6": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -1498,16 +1421,13 @@ "userUnlisten": [ 6, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } } ] @@ -1515,8 +1435,7 @@ "Does not raise event for initial document delete": { "describeName": "Listens:", "itName": "Does not raise event for initial document delete", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -1525,10 +1444,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -1538,10 +1455,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -1572,8 +1487,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 } }, @@ -1587,8 +1501,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -1597,10 +1510,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -1611,8 +1522,7 @@ "Does not synthesize deletes for previously acked documents": { "describeName": "Listens:", "itName": "Does not synthesize deletes for previously acked documents", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -1621,10 +1531,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" }, "targetId": 2 @@ -1634,10 +1542,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" } ], @@ -1674,8 +1580,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -1698,10 +1603,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" } } @@ -1717,8 +1620,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -1727,10 +1629,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" } } @@ -1740,25 +1640,20 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" }, "targetId": 2 @@ -1783,10 +1678,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" } } @@ -1796,10 +1689,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" } ], @@ -1813,8 +1704,7 @@ "Doesn't include unknown documents in cached result": { "describeName": "Listens:", "itName": "Doesn't include unknown documents in cached result", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -1839,10 +1729,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -1867,10 +1755,8 @@ "fromCache": true, "hasPendingWrites": true, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -1880,10 +1766,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -1897,8 +1781,7 @@ "Doesn't raise 'hasPendingWrites' for deletes": { "describeName": "Listens:", "itName": "Doesn't raise 'hasPendingWrites' for deletes", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -1907,10 +1790,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -1920,10 +1801,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -1968,8 +1847,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -1992,10 +1870,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -2009,10 +1885,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -2041,8 +1915,7 @@ "acknowledgedDocs": [ "collection/a" ], - "rejectedDocs": [ - ] + "rejectedDocs": [] } } }, @@ -2063,8 +1936,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 } } @@ -2073,8 +1945,7 @@ "Doesn't raise events for empty target": { "describeName": "Listens:", "itName": "Doesn't raise events for empty target", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -2083,10 +1954,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1" }, "targetId": 2 @@ -2096,10 +1965,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1" } ], @@ -2111,10 +1978,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection2" }, "targetId": 4 @@ -2124,10 +1989,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1" } ], @@ -2136,10 +1999,8 @@ "4": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection2" } ], @@ -2151,10 +2012,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection3" }, "targetId": 6 @@ -2164,10 +2023,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1" } ], @@ -2176,10 +2033,8 @@ "4": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection2" } ], @@ -2188,10 +2043,8 @@ "6": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection3" } ], @@ -2246,8 +2099,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -2256,10 +2108,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1" } }, @@ -2282,10 +2132,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection2" } } @@ -2296,8 +2144,7 @@ "Empty initial snapshot is raised from cache": { "describeName": "Listens:", "itName": "Empty initial snapshot is raised from cache", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -2306,10 +2153,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -2319,10 +2164,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -2338,8 +2181,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -2355,8 +2197,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -2365,10 +2206,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -2378,16 +2217,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -2400,10 +2236,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -2414,10 +2248,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -2427,10 +2259,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -2446,8 +2276,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -2463,8 +2292,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -2473,10 +2301,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -2503,10 +2329,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -2516,10 +2340,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -2537,8 +2359,7 @@ { "clientIndex": 0, "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -2556,8 +2377,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -2566,10 +2386,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -2580,16 +2398,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -2608,10 +2423,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -2622,10 +2435,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -2635,10 +2446,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -2655,10 +2464,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -2676,8 +2483,7 @@ { "clientIndex": 0, "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -2695,8 +2501,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, @@ -2709,10 +2514,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -2723,8 +2526,7 @@ "Empty-due-to-delete initial snapshot is raised from cache": { "describeName": "Listens:", "itName": "Empty-due-to-delete initial snapshot is raised from cache", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -2733,10 +2535,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -2746,10 +2546,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -2794,8 +2592,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -2818,10 +2615,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -2831,16 +2626,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -2856,10 +2648,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -2870,10 +2660,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -2883,10 +2671,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -2916,10 +2702,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -2929,10 +2713,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -2981,8 +2763,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -3005,10 +2786,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -3019,16 +2798,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -3051,10 +2827,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -3065,10 +2839,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -3078,10 +2850,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -3098,10 +2868,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -3120,8 +2888,7 @@ "acknowledgedDocs": [ "collection/a" ], - "rejectedDocs": [ - ] + "rejectedDocs": [] } } }, @@ -3159,8 +2926,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, @@ -3173,10 +2939,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -3187,8 +2951,7 @@ "Ensure correct query results with latency-compensated deletes": { "describeName": "Listens:", "itName": "Ensure correct query results with latency-compensated deletes", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -3200,10 +2963,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -3213,10 +2974,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -3273,8 +3032,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -3297,10 +3055,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -3309,12 +3065,10 @@ { "userListen": { "query": { - "filters": [ - ], + "filters": [], "limit": 10, "limitType": "LimitToFirst", - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "targetId": 4 @@ -3339,12 +3093,10 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 10, "limitType": "LimitToFirst", - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -3354,10 +3106,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -3366,12 +3116,10 @@ "4": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 10, "limitType": "LimitToFirst", - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -3385,8 +3133,7 @@ "ExpectedCount in listen request should work after coming back online": { "describeName": "Listens:", "itName": "ExpectedCount in listen request should work after coming back online", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -3395,10 +3142,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -3408,10 +3153,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -3456,8 +3199,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -3480,10 +3222,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -3497,21 +3237,16 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeLimboDocs": [ - ], - "activeTargets": { - }, - "enqueuedLimboDocs": [ - ] + "activeLimboDocs": [], + "activeTargets": {}, + "enqueuedLimboDocs": [] } }, { @@ -3521,10 +3256,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -3563,10 +3296,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -3576,10 +3307,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -3628,8 +3357,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -3652,10 +3380,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -3666,16 +3392,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -3690,10 +3413,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -3718,10 +3439,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -3731,10 +3450,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -3783,8 +3500,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -3793,10 +3509,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -3806,8 +3520,7 @@ "clientIndex": 0, "watchSnapshot": { "resumeToken": "resume-token-3000", - "targetIds": [ - ], + "targetIds": [], "version": 3000 } }, @@ -3819,10 +3532,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -3847,10 +3558,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -3860,10 +3569,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -3877,8 +3584,7 @@ "Ignores update from inactive target": { "describeName": "Listens:", "itName": "Ignores update from inactive target", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -3887,10 +3593,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -3900,10 +3604,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -3948,8 +3650,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -3972,10 +3673,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -3985,16 +3684,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -4020,8 +3716,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, @@ -4035,10 +3730,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -4063,10 +3756,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -4076,10 +3767,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -4093,8 +3782,7 @@ "Individual (deleted) documents cannot revert": { "describeName": "Listens:", "itName": "Individual (deleted) documents cannot revert", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -4110,8 +3798,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -4128,8 +3815,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -4175,8 +3861,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -4207,8 +3892,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -4225,14 +3909,12 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -4245,10 +3927,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 4 @@ -4274,10 +3954,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -4287,10 +3965,8 @@ "4": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -4329,8 +4005,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 4000 }, "expectedSnapshotEvents": [ @@ -4339,10 +4014,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -4367,16 +4040,13 @@ "userUnlisten": [ 4, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -4396,8 +4066,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -4415,8 +4084,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -4433,8 +4101,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -4480,8 +4147,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 5000 }, "expectedSnapshotEvents": [ @@ -4497,8 +4163,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -4515,14 +4180,12 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -4535,10 +4198,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 4 @@ -4549,10 +4210,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -4562,10 +4221,8 @@ "4": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -4581,8 +4238,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 4 ] @@ -4598,8 +4254,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 6000 }, "expectedSnapshotEvents": [ @@ -4608,10 +4263,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -4622,8 +4275,7 @@ "Individual documents cannot revert": { "describeName": "Listens:", "itName": "Individual documents cannot revert", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -4639,8 +4291,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -4657,8 +4308,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -4704,8 +4354,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -4736,8 +4385,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -4754,14 +4402,12 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -4774,10 +4420,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 4 @@ -4803,10 +4447,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -4816,10 +4458,8 @@ "4": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -4865,8 +4505,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 4000 }, "expectedSnapshotEvents": [ @@ -4890,10 +4529,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -4903,16 +4540,13 @@ "userUnlisten": [ 4, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -4932,8 +4566,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -4951,8 +4584,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -4969,8 +4601,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], @@ -5016,8 +4647,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 5000 }, "expectedSnapshotEvents": [ @@ -5033,8 +4663,7 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } } @@ -5051,14 +4680,12 @@ true ] ], - "orderBys": [ - ], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -5071,10 +4698,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 4 @@ -5100,10 +4725,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5113,10 +4736,8 @@ "4": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5132,8 +4753,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 4 ] @@ -5149,8 +4769,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 6000 }, "expectedSnapshotEvents": [ @@ -5159,10 +4778,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5192,10 +4809,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -5205,10 +4820,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5257,8 +4870,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -5281,10 +4893,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5302,10 +4912,8 @@ "clientIndex": 2, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -5330,10 +4938,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5343,10 +4949,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5363,12 +4967,9 @@ "clientIndex": 0, "shutdown": true, "expectedState": { - "activeLimboDocs": [ - ], - "activeTargets": { - }, - "enqueuedLimboDocs": [ - ] + "activeLimboDocs": [], + "activeTargets": {}, + "enqueuedLimboDocs": [] } }, { @@ -5383,10 +4984,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5436,8 +5035,7 @@ { "clientIndex": 1, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, @@ -5464,10 +5062,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5501,10 +5097,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -5514,10 +5108,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5534,10 +5126,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5586,8 +5176,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 } }, @@ -5614,10 +5203,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5631,12 +5218,9 @@ "clientIndex": 0, "shutdown": true, "expectedState": { - "activeLimboDocs": [ - ], - "activeTargets": { - }, - "enqueuedLimboDocs": [ - ] + "activeLimboDocs": [], + "activeTargets": {}, + "enqueuedLimboDocs": [] } }, { @@ -5647,10 +5231,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5700,8 +5282,7 @@ { "clientIndex": 2, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, @@ -5728,10 +5309,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5765,10 +5344,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -5778,10 +5355,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5798,10 +5373,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5850,8 +5423,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 } }, @@ -5878,10 +5450,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5895,10 +5465,8 @@ "clientIndex": 2, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -5923,10 +5491,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -5936,10 +5502,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -5956,12 +5520,9 @@ "clientIndex": 0, "shutdown": true, "expectedState": { - "activeLimboDocs": [ - ], - "activeTargets": { - }, - "enqueuedLimboDocs": [ - ] + "activeLimboDocs": [], + "activeTargets": {}, + "enqueuedLimboDocs": [] } }, { @@ -5976,10 +5537,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -6029,8 +5588,7 @@ { "clientIndex": 1, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -6053,10 +5611,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -6085,10 +5641,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -6099,8 +5653,7 @@ "Listens are reestablished after network disconnect": { "describeName": "Listens:", "itName": "Listens are reestablished after network disconnect", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -6109,10 +5662,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -6122,10 +5673,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -6171,8 +5720,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -6195,10 +5743,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -6212,21 +5758,16 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeLimboDocs": [ - ], - "activeTargets": { - }, - "enqueuedLimboDocs": [ - ] + "activeLimboDocs": [], + "activeTargets": {}, + "enqueuedLimboDocs": [] } }, { @@ -6236,10 +5777,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -6285,8 +5824,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -6309,10 +5847,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -6350,8 +5886,7 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -6369,8 +5904,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -6395,8 +5929,7 @@ "clientIndex": 2, "userListen": { "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -6414,8 +5947,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -6440,8 +5972,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -6453,8 +5984,7 @@ "path": "collection" }, { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -6523,8 +6053,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 } }, @@ -6563,8 +6092,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -6613,8 +6141,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -6633,8 +6160,7 @@ "userUnlisten": [ 2, { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -6647,8 +6173,7 @@ } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -6659,8 +6184,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -6702,8 +6226,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, @@ -6730,8 +6253,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -6787,8 +6309,7 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -6806,8 +6327,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -6832,8 +6352,7 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -6851,8 +6370,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -6877,8 +6395,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -6890,8 +6407,7 @@ "path": "collection" }, { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -6960,8 +6476,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -6996,8 +6511,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -7046,8 +6560,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -7066,8 +6579,7 @@ "userUnlisten": [ 2, { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -7080,8 +6592,7 @@ } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -7092,8 +6603,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -7135,8 +6645,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -7159,8 +6668,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -7196,8 +6704,7 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -7242,8 +6749,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -7261,8 +6767,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -7287,8 +6792,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -7300,8 +6804,7 @@ "path": "collection" }, { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -7323,8 +6826,7 @@ "userUnlisten": [ 2, { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -7341,8 +6843,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -7384,8 +6885,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 3000 } }, @@ -7412,8 +6912,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -7446,8 +6945,7 @@ "userUnlisten": [ 2, { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -7460,16 +6958,14 @@ } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { "clientIndex": 0, "drainQueue": true, "expectedState": { - "activeTargets": { - } + "activeTargets": {} } } ] @@ -7504,8 +7000,7 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -7523,8 +7018,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -7545,8 +7039,7 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -7564,8 +7057,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -7577,8 +7069,7 @@ "path": "collection" }, { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -7603,8 +7094,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -7616,8 +7106,7 @@ "path": "collection" }, { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -7686,8 +7175,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 } }, @@ -7726,8 +7214,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -7770,8 +7257,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -7790,8 +7276,7 @@ "userUnlisten": [ 2, { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToFirst", "orderBys": [ @@ -7808,8 +7293,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -7834,8 +7318,7 @@ "2": { "queries": [ { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -7877,8 +7360,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, @@ -7905,8 +7387,7 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -7939,8 +7420,7 @@ "userUnlisten": [ 2, { - "filters": [ - ], + "filters": [], "limit": 2, "limitType": "LimitToLast", "orderBys": [ @@ -7953,16 +7433,14 @@ } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { "clientIndex": 0, "drainQueue": true, "expectedState": { - "activeTargets": { - } + "activeTargets": {} } } ] @@ -7986,10 +7464,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -7999,10 +7475,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -8020,8 +7494,7 @@ { "clientIndex": 0, "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -8039,8 +7512,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -8049,10 +7521,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -8066,10 +7536,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -8080,10 +7548,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -8093,10 +7559,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -8118,21 +7582,16 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeLimboDocs": [ - ], - "activeTargets": { - }, - "enqueuedLimboDocs": [ - ] + "activeLimboDocs": [], + "activeTargets": {}, + "enqueuedLimboDocs": [] } }, { @@ -8144,10 +7603,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -8161,10 +7618,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -8183,8 +7638,7 @@ { "clientIndex": 2, "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -8202,8 +7656,7 @@ { "clientIndex": 2, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, @@ -8216,10 +7669,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -8234,10 +7685,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -8264,10 +7713,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -8277,10 +7724,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -8298,8 +7743,7 @@ { "clientIndex": 0, "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -8317,8 +7761,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -8327,10 +7770,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -8344,22 +7785,17 @@ "clientIndex": 1, "enableNetwork": false, "expectedState": { - "activeLimboDocs": [ - ], - "activeTargets": { - }, - "enqueuedLimboDocs": [ - ] + "activeLimboDocs": [], + "activeTargets": {}, + "enqueuedLimboDocs": [] } }, { "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -8370,10 +7806,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -8383,10 +7817,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -8408,21 +7840,16 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeLimboDocs": [ - ], - "activeTargets": { - }, - "enqueuedLimboDocs": [ - ] + "activeLimboDocs": [], + "activeTargets": {}, + "enqueuedLimboDocs": [] } }, { @@ -8433,10 +7860,8 @@ "clientIndex": 2, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -8447,10 +7872,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -8460,10 +7883,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -8476,10 +7897,8 @@ "clientIndex": 2, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -8490,10 +7909,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -8503,10 +7920,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -8536,10 +7951,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -8549,10 +7962,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -8570,33 +7981,25 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeLimboDocs": [ - ], - "activeTargets": { - }, - "enqueuedLimboDocs": [ - ] + "activeLimboDocs": [], + "activeTargets": {}, + "enqueuedLimboDocs": [] } }, { "clientIndex": 0, "shutdown": true, "expectedState": { - "activeLimboDocs": [ - ], - "activeTargets": { - }, - "enqueuedLimboDocs": [ - ] + "activeLimboDocs": [], + "activeTargets": {}, + "enqueuedLimboDocs": [] } }, { @@ -8607,10 +8010,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -8620,10 +8021,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -8648,10 +8047,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -8661,10 +8058,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -8709,8 +8104,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -8733,10 +8127,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -8745,29 +8137,23 @@ { "watchSnapshot": { "resumeToken": "resume-token-2000", - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, { "restart": true, "expectedState": { - "activeLimboDocs": [ - ], - "activeTargets": { - }, - "enqueuedLimboDocs": [ - ] + "activeLimboDocs": [], + "activeTargets": {}, + "enqueuedLimboDocs": [] } }, { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -8792,10 +8178,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -8805,10 +8189,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -8832,8 +8214,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 3000 }, "expectedSnapshotEvents": [ @@ -8842,10 +8223,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -8867,10 +8246,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -8880,10 +8257,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -8928,8 +8303,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -8952,10 +8326,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -8964,29 +8336,23 @@ { "watchSnapshot": { "resumeToken": "resume-token-minutes-later", - "targetIds": [ - ], + "targetIds": [], "version": 300001000 } }, { "restart": true, "expectedState": { - "activeLimboDocs": [ - ], - "activeTargets": { - }, - "enqueuedLimboDocs": [ - ] + "activeLimboDocs": [], + "activeTargets": {}, + "enqueuedLimboDocs": [] } }, { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -9011,10 +8377,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -9024,10 +8388,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -9051,8 +8413,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 300002000 }, "expectedSnapshotEvents": [ @@ -9061,10 +8422,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -9075,8 +8434,7 @@ "Persists global resume tokens on unlisten": { "describeName": "Listens:", "itName": "Persists global resume tokens on unlisten", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -9085,10 +8443,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -9098,10 +8454,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -9146,8 +8500,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -9170,10 +8523,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -9182,8 +8533,7 @@ { "watchSnapshot": { "resumeToken": "resume-token-2000", - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, @@ -9191,16 +8541,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -9213,10 +8560,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -9241,10 +8586,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -9254,10 +8597,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -9281,8 +8622,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 3000 }, "expectedSnapshotEvents": [ @@ -9291,10 +8631,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -9305,8 +8643,7 @@ "Persists resume token sent with target": { "describeName": "Listens:", "itName": "Persists resume token sent with target", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -9315,10 +8652,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -9328,10 +8663,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -9347,8 +8680,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -9364,8 +8696,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -9374,10 +8705,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -9415,8 +8744,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -9439,10 +8767,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -9452,16 +8778,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -9474,10 +8797,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -9502,10 +8823,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -9515,10 +8834,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -9534,8 +8851,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -9551,8 +8867,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 3000 }, "expectedSnapshotEvents": [ @@ -9561,10 +8876,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -9591,10 +8904,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -9604,10 +8915,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -9625,8 +8934,7 @@ { "clientIndex": 0, "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -9644,8 +8952,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -9654,10 +8961,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -9677,10 +8982,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -9730,8 +9033,7 @@ { "clientIndex": 1, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, @@ -9739,12 +9041,9 @@ "clientIndex": 1, "shutdown": true, "expectedState": { - "activeLimboDocs": [ - ], - "activeTargets": { - }, - "enqueuedLimboDocs": [ - ] + "activeLimboDocs": [], + "activeTargets": {}, + "enqueuedLimboDocs": [] } }, { @@ -9777,10 +9076,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -9790,10 +9087,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -9831,10 +9126,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -9844,10 +9137,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -9864,10 +9155,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -9916,8 +9205,7 @@ { "clientIndex": 1, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 } }, @@ -9944,10 +9232,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -9967,10 +9253,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -10035,8 +9319,7 @@ { "clientIndex": 2, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, @@ -10063,10 +9346,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -10086,10 +9367,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -10139,8 +9418,7 @@ { "clientIndex": 1, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 3000 } }, @@ -10167,10 +9445,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -10207,10 +9483,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -10220,10 +9494,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -10240,10 +9512,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -10283,8 +9553,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 } }, @@ -10311,10 +9580,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -10336,8 +9603,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, @@ -10350,10 +9616,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -10387,10 +9651,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -10400,10 +9662,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -10420,10 +9680,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -10472,8 +9730,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 100 } }, @@ -10500,10 +9757,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -10538,8 +9793,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, @@ -10547,10 +9801,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -10587,10 +9839,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -10600,10 +9850,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -10637,8 +9885,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 3000 }, "expectedSnapshotEvents": [ @@ -10661,10 +9908,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -10693,10 +9938,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } }, @@ -10719,10 +9962,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -10733,8 +9974,7 @@ "Query is rejected and re-listened to": { "describeName": "Listens:", "itName": "Query is rejected and re-listened to", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -10743,10 +9983,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -10756,10 +9994,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -10783,26 +10019,21 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -10812,10 +10043,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -10831,8 +10060,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -10848,8 +10076,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -10858,10 +10085,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -10898,10 +10123,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -10911,10 +10134,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -10931,10 +10152,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -10954,8 +10173,7 @@ ] }, "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -10967,10 +10185,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -10980,10 +10196,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -10993,10 +10207,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -11013,10 +10225,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -11034,8 +10244,7 @@ { "clientIndex": 0, "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -11053,8 +10262,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 } }, @@ -11067,10 +10275,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -11107,10 +10313,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -11120,10 +10324,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -11140,10 +10342,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -11163,8 +10363,7 @@ ] }, "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -11176,10 +10375,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -11216,10 +10413,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -11229,10 +10424,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -11249,10 +10442,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -11301,8 +10492,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 } }, @@ -11329,10 +10519,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -11343,24 +10531,20 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { "clientIndex": 0, "drainQueue": true, "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -11379,10 +10563,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -11407,10 +10589,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -11420,10 +10600,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -11440,10 +10618,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -11492,8 +10668,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, @@ -11520,10 +10695,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -11556,10 +10729,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -11569,10 +10740,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -11621,8 +10790,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -11645,10 +10813,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -11662,10 +10828,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -11690,10 +10854,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -11703,10 +10865,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -11723,10 +10883,8 @@ "clientIndex": 2, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -11751,10 +10909,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -11764,10 +10920,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -11805,8 +10959,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -11829,10 +10982,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -11861,10 +11012,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -11893,10 +11042,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -11929,10 +11076,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -11942,10 +11087,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -11994,8 +11137,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -12018,10 +11160,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -12035,10 +11175,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -12063,10 +11201,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -12076,10 +11212,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -12097,10 +11231,8 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -12109,10 +11241,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -12146,8 +11276,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, @@ -12174,10 +11303,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -12188,24 +11315,20 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { "clientIndex": 0, "drainQueue": true, "expectedState": { - "activeTargets": { - } + "activeTargets": {} } } ] @@ -12243,10 +11366,8 @@ "clientIndex": 2, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -12256,10 +11377,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -12276,10 +11395,8 @@ "clientIndex": 3, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -12289,10 +11406,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -12309,10 +11424,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -12361,8 +11474,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 } }, @@ -12393,10 +11505,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -12425,10 +11535,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -12458,10 +11566,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -12471,10 +11577,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -12523,8 +11627,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -12547,10 +11650,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -12564,10 +11665,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -12592,10 +11691,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -12605,10 +11702,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -12627,10 +11722,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -12680,8 +11773,7 @@ { "clientIndex": 1, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -12704,10 +11796,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -12746,8 +11836,7 @@ { "clientIndex": 1, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 3000 }, "expectedSnapshotEvents": [ @@ -12770,10 +11859,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -12818,10 +11905,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -12835,8 +11920,7 @@ "Re-opens target without existence filter": { "describeName": "Listens:", "itName": "Re-opens target without existence filter", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -12845,10 +11929,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -12858,10 +11940,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -12906,8 +11986,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -12930,10 +12009,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -12943,16 +12020,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -12965,10 +12039,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -12993,10 +12065,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -13006,10 +12076,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -13048,8 +12116,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -13058,10 +12125,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -13086,8 +12151,7 @@ "Resuming a query should specify expectedCount that does not include pending mutations": { "describeName": "Listens:", "itName": "Resuming a query should specify expectedCount that does not include pending mutations", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -13096,10 +12160,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -13109,10 +12171,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -13157,8 +12217,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -13181,10 +12240,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -13194,16 +12251,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -13217,10 +12271,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -13257,10 +12309,8 @@ "fromCache": true, "hasPendingWrites": true, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -13270,10 +12320,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -13287,8 +12335,7 @@ "Resuming a query should specify expectedCount when adding the target": { "describeName": "Listens:", "itName": "Resuming a query should specify expectedCount when adding the target", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -13297,10 +12344,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -13310,10 +12355,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -13329,8 +12372,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -13346,8 +12388,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -13356,10 +12397,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -13369,16 +12408,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -13391,10 +12427,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -13405,10 +12439,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -13418,10 +12450,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -13478,8 +12508,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -13514,10 +12543,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -13527,25 +12554,20 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -13582,10 +12604,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -13595,10 +12615,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -13640,10 +12658,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -13653,10 +12669,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -13705,8 +12719,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -13729,10 +12742,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -13743,16 +12754,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -13771,10 +12779,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -13799,10 +12805,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -13812,10 +12816,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -13832,10 +12834,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -13884,8 +12884,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1500 } }, @@ -13898,10 +12897,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -13924,10 +12921,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -13961,8 +12956,7 @@ "acknowledgedDocs": [ "collection/a" ], - "rejectedDocs": [ - ] + "rejectedDocs": [] } } }, @@ -14000,8 +12994,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, @@ -14045,10 +13038,8 @@ "fromCache": false, "hasPendingWrites": true, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -14084,10 +13075,8 @@ "clientIndex": 0, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -14097,10 +13086,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -14149,8 +13136,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -14173,10 +13159,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -14187,16 +13171,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -14215,10 +13196,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -14243,10 +13222,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -14256,10 +13233,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -14275,11 +13250,9 @@ "activeTargets": { "2": { "queries": [ - { - "filters": [ - ], - "orderBys": [ - ], + { + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -14328,8 +13301,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1500 } }, @@ -14342,10 +13314,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -14387,10 +13357,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -14427,10 +13395,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -14440,10 +13406,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -14460,10 +13424,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -14481,8 +13443,7 @@ { "clientIndex": 0, "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -14500,8 +13461,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 } }, @@ -14514,10 +13474,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -14531,12 +13489,9 @@ "clientIndex": 0, "enableNetwork": false, "expectedState": { - "activeLimboDocs": [ - ], - "activeTargets": { - }, - "enqueuedLimboDocs": [ - ] + "activeLimboDocs": [], + "activeTargets": {}, + "enqueuedLimboDocs": [] } }, { @@ -14548,10 +13503,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -14569,10 +13522,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -14590,8 +13541,7 @@ { "clientIndex": 0, "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -14609,8 +13559,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, @@ -14623,10 +13572,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -14663,10 +13610,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -14676,10 +13621,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -14696,10 +13639,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -14717,8 +13658,7 @@ { "clientIndex": 0, "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -14736,8 +13676,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 } }, @@ -14750,10 +13689,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -14763,12 +13700,9 @@ "clientIndex": 1, "enableNetwork": false, "expectedState": { - "activeLimboDocs": [ - ], - "activeTargets": { - }, - "enqueuedLimboDocs": [ - ] + "activeLimboDocs": [], + "activeTargets": {}, + "enqueuedLimboDocs": [] } }, { @@ -14800,8 +13734,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, @@ -14828,10 +13761,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -14845,12 +13776,9 @@ "clientIndex": 0, "enableNetwork": false, "expectedState": { - "activeLimboDocs": [ - ], - "activeTargets": { - }, - "enqueuedLimboDocs": [ - ], + "activeLimboDocs": [], + "activeTargets": {}, + "enqueuedLimboDocs": [], "isPrimary": true } }, @@ -14863,10 +13791,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -14880,8 +13806,7 @@ "Synthesizes deletes for missing document": { "describeName": "Listens:", "itName": "Synthesizes deletes for missing document", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -14890,10 +13815,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -14903,10 +13826,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -14963,8 +13884,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -14999,10 +13919,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -15012,16 +13930,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -15034,10 +13949,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -15074,10 +13987,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -15087,10 +13998,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -15103,25 +14012,20 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" }, "targetId": 4 @@ -15146,10 +14050,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" } } @@ -15159,10 +14061,8 @@ "4": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" } ], @@ -15186,8 +14086,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -15196,10 +14095,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" }, "removed": [ @@ -15223,16 +14120,13 @@ "userUnlisten": [ 4, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -15245,10 +14139,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -15273,10 +14165,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -15286,10 +14176,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -15326,10 +14214,8 @@ "clientIndex": 1, "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -15339,10 +14225,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -15359,10 +14243,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -15428,8 +14310,7 @@ { "clientIndex": 0, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 } }, @@ -15441,10 +14322,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -15493,8 +14372,7 @@ { "clientIndex": 1, "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -15517,10 +14395,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -15531,8 +14407,7 @@ "Waits until Watch catches up to local deletes ": { "describeName": "Listens:", "itName": "Waits until Watch catches up to local deletes ", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -15541,10 +14416,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -15554,10 +14427,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -15602,8 +14473,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -15626,10 +14496,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -15643,10 +14511,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "removed": [ @@ -15689,8 +14555,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, @@ -15703,8 +14568,7 @@ "acknowledgedDocs": [ "collection/a" ], - "rejectedDocs": [ - ] + "rejectedDocs": [] } } }, @@ -15731,8 +14595,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 3000 } }, @@ -15759,8 +14622,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 5000 }, "expectedSnapshotEvents": [ @@ -15783,10 +14645,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -15797,8 +14657,7 @@ "Will gracefully handle watch stream reverting snapshots": { "describeName": "Listens:", "itName": "Will gracefully handle watch stream reverting snapshots", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -15807,10 +14666,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -15820,10 +14677,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -15868,8 +14723,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -15892,10 +14746,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -15924,8 +14776,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -15948,10 +14799,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -15961,16 +14810,13 @@ "userUnlisten": [ 2, { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { @@ -15983,10 +14829,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -16011,10 +14855,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -16024,10 +14866,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -16072,8 +14912,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 } }, @@ -16100,8 +14939,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -16110,10 +14948,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -16135,10 +14971,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -16148,10 +14982,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -16196,8 +15028,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -16220,10 +15051,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -16252,8 +15081,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -16276,10 +15104,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -16288,21 +15114,16 @@ { "restart": true, "expectedState": { - "activeLimboDocs": [ - ], - "activeTargets": { - }, - "enqueuedLimboDocs": [ - ] + "activeLimboDocs": [], + "activeTargets": {}, + "enqueuedLimboDocs": [] } }, { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -16327,10 +15148,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -16340,10 +15159,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -16388,8 +15205,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 } }, @@ -16416,8 +15232,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -16426,10 +15241,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -16440,8 +15253,7 @@ "Will gracefully process failed targets": { "describeName": "Listens:", "itName": "Will gracefully process failed targets", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -16450,10 +15262,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1" }, "targetId": 2 @@ -16463,10 +15273,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1" } ], @@ -16478,10 +15286,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection2" }, "targetId": 4 @@ -16491,10 +15297,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1" } ], @@ -16503,10 +15307,8 @@ "4": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection2" } ], @@ -16582,10 +15384,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection1" } } @@ -16595,10 +15395,8 @@ "4": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection2" } ], @@ -16617,8 +15415,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 }, "expectedSnapshotEvents": [ @@ -16641,10 +15438,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection2" } } @@ -16655,8 +15450,7 @@ "Will process removals without waiting for a consistent snapshot": { "describeName": "Listens:", "itName": "Will process removals without waiting for a consistent snapshot", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -16665,10 +15459,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -16678,10 +15470,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -16710,17 +15500,14 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } } ] @@ -16728,8 +15515,7 @@ "Will re-issue listen for errored target": { "describeName": "Listens:", "itName": "Will re-issue listen for errored target", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": false @@ -16738,10 +15524,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -16751,10 +15535,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -16783,26 +15565,21 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } ], "expectedState": { - "activeTargets": { - } + "activeTargets": {} } }, { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -16812,10 +15589,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -16831,8 +15606,7 @@ }, { "watchEntity": { - "docs": [ - ], + "docs": [], "targets": [ 2 ] @@ -16848,8 +15622,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -16858,10 +15631,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -16872,8 +15643,7 @@ "onSnapshotsInSync fires for metadata changes": { "describeName": "Listens:", "itName": "onSnapshotsInSync fires for metadata changes", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -16882,10 +15652,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -16895,10 +15663,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -16943,8 +15709,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -16967,10 +15732,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -17007,10 +15770,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -17040,8 +15801,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, @@ -17069,10 +15829,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -17083,8 +15841,7 @@ "acknowledgedDocs": [ "collection/a" ], - "rejectedDocs": [ - ] + "rejectedDocs": [] } } } @@ -17093,8 +15850,7 @@ "onSnapshotsInSync fires for multiple listeners": { "describeName": "Listens:", "itName": "onSnapshotsInSync fires for multiple listeners", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -17103,10 +15859,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -17116,10 +15870,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -17164,8 +15916,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -17188,10 +15939,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -17228,10 +15977,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -17273,10 +16020,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -17313,10 +16058,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -17328,8 +16071,7 @@ "onSnapshotsInSync fires once for multiple event snapshots": { "describeName": "Listens:", "itName": "onSnapshotsInSync fires once for multiple event snapshots", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -17338,10 +16080,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" }, "targetId": 2 @@ -17351,10 +16091,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -17399,8 +16137,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -17423,10 +16160,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } } @@ -17435,10 +16170,8 @@ { "userListen": { "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" }, "targetId": 4 @@ -17463,10 +16196,8 @@ "fromCache": true, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" } } @@ -17476,10 +16207,8 @@ "2": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } ], @@ -17488,10 +16217,8 @@ "4": { "queries": [ { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" } ], @@ -17536,8 +16263,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 1000 }, "expectedSnapshotEvents": [ @@ -17546,10 +16272,8 @@ "fromCache": false, "hasPendingWrites": false, "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" } } @@ -17586,10 +16310,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } }, @@ -17612,10 +16334,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" } } @@ -17646,8 +16366,7 @@ }, { "watchSnapshot": { - "targetIds": [ - ], + "targetIds": [], "version": 2000 } }, @@ -17675,10 +16394,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection" } }, @@ -17701,10 +16418,8 @@ } ], "query": { - "filters": [ - ], - "orderBys": [ - ], + "filters": [], + "orderBys": [], "path": "collection/a" } } @@ -17715,8 +16430,7 @@ "acknowledgedDocs": [ "collection/a" ], - "rejectedDocs": [ - ] + "rejectedDocs": [] } } } @@ -17725,8 +16439,7 @@ "onSnapshotsInSync fires when called even if there are no local listeners": { "describeName": "Listens:", "itName": "onSnapshotsInSync fires when called even if there are no local listeners", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -17745,8 +16458,7 @@ "onSnapshotsInSync should not fire for doc changes if there are no listeners": { "describeName": "Listens:", "itName": "onSnapshotsInSync should not fire for doc changes if there are no listeners", - "tags": [ - ], + "tags": [], "config": { "numClients": 1, "useEagerGCForMemory": true @@ -17766,4 +16478,4 @@ } ] } -} +} \ No newline at end of file diff --git a/firebase-firestore/src/test/resources/json/remote_store_spec_test.json b/firebase-firestore/src/test/resources/json/remote_store_spec_test.json index ee992a2c7d7..f2000682b17 100644 --- a/firebase-firestore/src/test/resources/json/remote_store_spec_test.json +++ b/firebase-firestore/src/test/resources/json/remote_store_spec_test.json @@ -131,6 +131,373 @@ } ] }, + "Handles removal of old target (with cause) after re-listen": { + "describeName": "Remote store:", + "itName": "Handles removal of old target (with cause) after re-listen", + "tags": [ + ], + "config": { + "allowUnlistedTargetRemoval": true, + "numClients": 1, + "useEagerGCForMemory": false + }, + "steps": [ + { + "userListen": { + "query": { + "filters": [ + ], + "orderBys": [ + ], + "path": "collection" + }, + "targetId": 2 + }, + "expectedState": { + "activeTargets": { + "2": { + "queries": [ + { + "filters": [ + ], + "orderBys": [ + ], + "path": "collection" + } + ], + "resumeToken": "" + } + } + } + }, + { + "watchAck": [ + 2 + ] + }, + { + "userUnlisten": [ + 2, + { + "filters": [ + ], + "orderBys": [ + ], + "path": "collection" + } + ], + "expectedState": { + "activeTargets": { + } + } + }, + { + "userListen": { + "query": { + "filters": [ + ], + "orderBys": [ + ], + "path": "collection" + }, + "targetId": 2 + }, + "expectedState": { + "activeTargets": { + "2": { + "queries": [ + { + "filters": [ + ], + "orderBys": [ + ], + "path": "collection" + } + ], + "resumeToken": "" + } + } + } + }, + { + "watchUsesTargetIndex": 0 + }, + { + "watchRemove": { + "cause": { + "code": 8 + }, + "targetIds": [ + 2 + ] + }, + "expectedState": { + "activeTargets": { + "2": { + "queries": [ + { + "filters": [ + ], + "orderBys": [ + ], + "path": "collection" + } + ], + "resumeToken": "" + } + } + } + }, + { + "watchUsesTargetIndex": "latest" + }, + { + "watchAck": [ + 2 + ], + "expectedState": { + "activeTargets": { + "2": { + "queries": [ + { + "filters": [ + ], + "orderBys": [ + ], + "path": "collection" + } + ], + "resumeToken": "" + } + } + } + } + ] + }, + "Handles removal of old target after re-listen": { + "describeName": "Remote store:", + "itName": "Handles removal of old target after re-listen", + "tags": [ + ], + "config": { + "numClients": 1, + "useEagerGCForMemory": false + }, + "steps": [ + { + "userListen": { + "query": { + "filters": [ + ], + "orderBys": [ + ], + "path": "collection" + }, + "targetId": 2 + }, + "expectedState": { + "activeTargets": { + "2": { + "queries": [ + { + "filters": [ + ], + "orderBys": [ + ], + "path": "collection" + } + ], + "resumeToken": "" + } + } + } + }, + { + "watchAck": [ + 2 + ] + }, + { + "userUnlisten": [ + 2, + { + "filters": [ + ], + "orderBys": [ + ], + "path": "collection" + } + ], + "expectedState": { + "activeTargets": { + } + } + }, + { + "userListen": { + "query": { + "filters": [ + ], + "orderBys": [ + ], + "path": "collection" + }, + "targetId": 2 + }, + "expectedState": { + "activeTargets": { + "2": { + "queries": [ + { + "filters": [ + ], + "orderBys": [ + ], + "path": "collection" + } + ], + "resumeToken": "" + } + } + } + }, + { + "watchUsesTargetIndex": 0 + }, + { + "watchRemove": { + "targetIds": [ + 2 + ] + } + }, + { + "watchUsesTargetIndex": "latest" + }, + { + "watchAck": [ + 2 + ], + "expectedState": { + "activeTargets": { + "2": { + "queries": [ + { + "filters": [ + ], + "orderBys": [ + ], + "path": "collection" + } + ], + "resumeToken": "" + } + } + } + } + ] + }, + "Handles removal of target with cause after unlisten and ignores future messages": { + "describeName": "Remote store:", + "itName": "Handles removal of target with cause after unlisten and ignores future messages", + "tags": [ + ], + "config": { + "allowUnlistedTargetRemoval": true, + "numClients": 1, + "useEagerGCForMemory": false + }, + "steps": [ + { + "userListen": { + "query": { + "filters": [ + ], + "orderBys": [ + ], + "path": "collection" + }, + "targetId": 2 + }, + "expectedState": { + "activeTargets": { + "2": { + "queries": [ + { + "filters": [ + ], + "orderBys": [ + ], + "path": "collection" + } + ], + "resumeToken": "" + } + } + } + }, + { + "watchAck": [ + 2 + ] + }, + { + "userUnlisten": [ + 2, + { + "filters": [ + ], + "orderBys": [ + ], + "path": "collection" + } + ], + "expectedState": { + "activeTargets": { + } + } + }, + { + "watchRemove": { + "cause": { + "code": 8 + }, + "targetIds": [ + 2 + ] + }, + "expectedState": { + "activeTargets": { + } + } + }, + { + "watchEntity": { + "docs": [ + { + "createTime": 0, + "key": "collection/a", + "options": { + "hasCommittedMutations": false, + "hasLocalMutations": false + }, + "value": { + "key": "a" + }, + "version": 1000 + } + ], + "targets": [ + 2 + ] + }, + "expectedState": { + "activeTargets": { + } + } + } + ] + }, "Handles user changes while offline (b/74749605).": { "describeName": "Remote store:", "itName": "Handles user changes while offline (b/74749605).", @@ -439,6 +806,9 @@ "version": 1000 } }, + { + "watchUsesTargetIndex": 0 + }, { "watchRemove": { "targetIds": [ @@ -446,6 +816,9 @@ ] } }, + { + "watchUsesTargetIndex": 1 + }, { "watchAck": [ 2 @@ -494,6 +867,9 @@ ] } }, + { + "watchUsesTargetIndex": 2 + }, { "watchAck": [ 2 @@ -542,6 +918,9 @@ ] } }, + { + "watchUsesTargetIndex": 3 + }, { "watchAck": [ 2 @@ -700,6 +1079,9 @@ } } }, + { + "watchUsesTargetIndex": 0 + }, { "watchEntity": { "docs": [ @@ -743,6 +1125,9 @@ ] } }, + { + "watchUsesTargetIndex": "latest" + }, { "watchAck": [ 2 diff --git a/firebase-firestore/src/testUtil/java/com/google/firebase/firestore/testutil/TestTargetMetadataProvider.java b/firebase-firestore/src/testUtil/java/com/google/firebase/firestore/testutil/TestTargetMetadataProvider.java index 71cb84b9de8..ef28c87dbad 100644 --- a/firebase-firestore/src/testUtil/java/com/google/firebase/firestore/testutil/TestTargetMetadataProvider.java +++ b/firebase-firestore/src/testUtil/java/com/google/firebase/firestore/testutil/TestTargetMetadataProvider.java @@ -17,6 +17,7 @@ import com.google.firebase.database.collection.ImmutableSortedSet; import com.google.firebase.firestore.local.TargetData; import com.google.firebase.firestore.model.DocumentKey; +import com.google.firebase.firestore.remote.RemoteTargetId; import com.google.firebase.firestore.remote.WatchChangeAggregator; import java.util.HashMap; import java.util.Map; @@ -31,16 +32,23 @@ public class TestTargetMetadataProvider implements WatchChangeAggregator.TargetM final Map queryData = new HashMap<>(); @Override - public ImmutableSortedSet getRemoteKeysForTarget(int targetId) { + public ImmutableSortedSet getRemoteKeysForTarget(RemoteTargetId remoteTargetId) { + int targetId = remoteTargetId.value(); return syncedKeys.get(targetId) != null ? syncedKeys.get(targetId) : DocumentKey.emptyKeySet(); } @androidx.annotation.Nullable @Override - public TargetData getTargetDataForTarget(int targetId) { + public TargetData getTargetDataForTarget(RemoteTargetId remoteTargetId) { + int targetId = remoteTargetId.value(); return queryData.get(targetId); } + @Override + public int getSdkTargetId(RemoteTargetId remoteTargetId) { + return remoteTargetId.value(); + } + /** Sets or replaces the local state for the provided query data. */ public void setSyncedKeys(TargetData targetData, ImmutableSortedSet keys) { this.queryData.put(targetData.getTargetId(), targetData); diff --git a/firebase-firestore/src/testUtil/java/com/google/firebase/firestore/testutil/TestUtil.java b/firebase-firestore/src/testUtil/java/com/google/firebase/firestore/testutil/TestUtil.java index 804a3a26294..c5d2099c487 100644 --- a/firebase-firestore/src/testUtil/java/com/google/firebase/firestore/testutil/TestUtil.java +++ b/firebase-firestore/src/testUtil/java/com/google/firebase/firestore/testutil/TestUtil.java @@ -76,6 +76,7 @@ import com.google.firebase.firestore.model.mutation.VerifyMutation; import com.google.firebase.firestore.remote.ExistenceFilter; import com.google.firebase.firestore.remote.RemoteEvent; +import com.google.firebase.firestore.remote.RemoteTargetId; import com.google.firebase.firestore.remote.TargetChange; import com.google.firebase.firestore.remote.WatchChange; import com.google.firebase.firestore.remote.WatchChange.DocumentChange; @@ -493,14 +494,20 @@ public static RemoteEvent addedRemoteEvent( TEST_PROJECT, new WatchChangeAggregator.TargetMetadataProvider() { @Override - public ImmutableSortedSet getRemoteKeysForTarget(int targetId) { + public ImmutableSortedSet getRemoteKeysForTarget( + RemoteTargetId targetId) { return DocumentKey.emptyKeySet(); } @Override - public TargetData getTargetDataForTarget(int targetId) { + public TargetData getTargetDataForTarget(RemoteTargetId targetId) { ResourcePath collectionPath = docs.get(0).getKey().getCollectionPath(); - return targetData(targetId, QueryPurpose.LISTEN, collectionPath.toString()); + return targetData(targetId.value(), QueryPurpose.LISTEN, collectionPath.toString()); + } + + @Override + public int getSdkTargetId(RemoteTargetId remoteTargetId) { + return remoteTargetId.value(); } }); @@ -540,16 +547,22 @@ public static RemoteEvent updateRemoteEvent( TEST_PROJECT, new WatchChangeAggregator.TargetMetadataProvider() { @Override - public ImmutableSortedSet getRemoteKeysForTarget(int targetId) { + public ImmutableSortedSet getRemoteKeysForTarget( + RemoteTargetId targetId) { return DocumentKey.emptyKeySet().insert(doc.getKey()); } @Override - public TargetData getTargetDataForTarget(int targetId) { - return activeTargets.contains(targetId) - ? targetData(targetId, QueryPurpose.LISTEN, doc.getKey().toString()) + public TargetData getTargetDataForTarget(RemoteTargetId targetId) { + return activeTargets.contains(targetId.value()) + ? targetData(targetId.value(), QueryPurpose.LISTEN, doc.getKey().toString()) : null; } + + @Override + public int getSdkTargetId(RemoteTargetId remoteTargetId) { + return remoteTargetId.value(); + } }); aggregator.handleDocumentChange(change); return aggregator.createRemoteEvent(doc.getVersion()); From 4a168610af0aa00d1871e47dc16bf823b377b986 Mon Sep 17 00:00:00 2001 From: Mark Duckworth <1124037+MarkDuckworth@users.noreply.github.com> Date: Thu, 7 May 2026 15:38:08 -0600 Subject: [PATCH 2/7] PR feedback wrt performance --- .../firestore/remote/RemoteStore.java | 39 +++++++++++++------ 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteStore.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteStore.java index 39b923514c2..0e87db1c80b 100644 --- a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteStore.java +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteStore.java @@ -405,6 +405,12 @@ public void listen(TargetData targetData) { if (remoteTargetId == null) { TargetOrPipeline top = targetData.getTarget(); + String topCanonicalId = + top.isPipeline() + ? getPipelineCanonicalIdExceptSort( + top.pipeline$com_google_firebase_firebase_firestore()) + : null; + for (Map.Entry entry : listenTargets.entrySet()) { TargetOrPipeline activeTop = entry.getValue().getTarget(); if (top.isTarget() && activeTop.isTarget()) { @@ -414,11 +420,9 @@ public void listen(TargetData targetData) { break; } } else if (top.isPipeline() && activeTop.isPipeline()) { - if (getPipelineCanonicalIdExceptSort( - top.pipeline$com_google_firebase_firebase_firestore()) - .equals( - getPipelineCanonicalIdExceptSort( - activeTop.pipeline$com_google_firebase_firebase_firestore()))) { + if (topCanonicalId.equals( + getPipelineCanonicalIdExceptSort( + activeTop.pipeline$com_google_firebase_firebase_firestore()))) { remoteTargetId = entry.getKey(); targetIdMapSdkToRemote.put(sdkTargetId, remoteTargetId); break; @@ -629,14 +633,26 @@ private void raiseWatchSnapshot(SnapshotVersion snapshotVersion) { "Can't raise event for unknown SnapshotVersion"); RemoteEvent remoteEvent = watchChangeAggregator.createRemoteEvent(snapshotVersion); + Map> remoteToSdkIds = new HashMap<>(); + for (Entry entry : targetIdMapSdkToRemote.entrySet()) { + RemoteTargetId remoteTargetId = entry.getValue(); + List sdkIds = remoteToSdkIds.get(remoteTargetId); + if (sdkIds == null) { + sdkIds = new ArrayList<>(); + remoteToSdkIds.put(remoteTargetId, sdkIds); + } + sdkIds.add(entry.getKey()); + } + Map duplicatedTargetChanges = new HashMap<>(); for (Entry entry : remoteEvent.getTargetChanges().entrySet()) { int sdkTargetId = entry.getKey(); RemoteTargetId remoteTargetId = targetIdMapSdkToRemote.get(sdkTargetId); if (remoteTargetId != null) { - for (Entry mapping : targetIdMapSdkToRemote.entrySet()) { - if (mapping.getValue().equals(remoteTargetId)) { - duplicatedTargetChanges.put(mapping.getKey(), entry.getValue()); + List sdkIds = remoteToSdkIds.get(remoteTargetId); + if (sdkIds != null) { + for (int mappedSdkId : sdkIds) { + duplicatedTargetChanges.put(mappedSdkId, entry.getValue()); } } } else { @@ -649,9 +665,10 @@ private void raiseWatchSnapshot(SnapshotVersion snapshotVersion) { int sdkTargetId = entry.getKey(); RemoteTargetId remoteTargetId = targetIdMapSdkToRemote.get(sdkTargetId); if (remoteTargetId != null) { - for (Entry mapping : targetIdMapSdkToRemote.entrySet()) { - if (mapping.getValue().equals(remoteTargetId)) { - duplicatedTargetMismatches.put(mapping.getKey(), entry.getValue()); + List sdkIds = remoteToSdkIds.get(remoteTargetId); + if (sdkIds != null) { + for (int mappedSdkId : sdkIds) { + duplicatedTargetMismatches.put(mappedSdkId, entry.getValue()); } } } else { From e3267011d545ef14c1699bd72269f208c4f82afd Mon Sep 17 00:00:00 2001 From: Mark Duckworth <1124037+MarkDuckworth@users.noreply.github.com> Date: Tue, 12 May 2026 14:18:56 -0600 Subject: [PATCH 3/7] Add RemoteTargetData class and fixed the remote store port to match web --- .../firestore/local/BaseTargetData.java | 147 +++++++++++++++ .../firebase/firestore/local/TargetData.java | 171 ++++++------------ .../firestore/remote/RemoteSerializer.java | 7 +- .../firestore/remote/RemoteStore.java | 144 +++++++-------- .../firestore/remote/RemoteTargetData.java | 156 ++++++++++++++++ .../remote/WatchChangeAggregator.java | 15 +- .../firestore/remote/WatchStream.java | 7 +- .../firestore/local/TargetDataTest.java | 146 +++++++++++++++ .../firestore/remote/MockDatastore.java | 17 +- .../firestore/remote/RemoteEventTest.java | 49 +++-- .../remote/RemoteSerializerTest.java | 65 ++++--- .../firebase/firestore/spec/SpecTestCase.java | 5 +- .../testutil/TestTargetMetadataProvider.java | 12 +- .../firebase/firestore/testutil/TestUtil.java | 57 ++++-- 14 files changed, 700 insertions(+), 298 deletions(-) create mode 100644 firebase-firestore/src/main/java/com/google/firebase/firestore/local/BaseTargetData.java create mode 100644 firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteTargetData.java create mode 100644 firebase-firestore/src/test/java/com/google/firebase/firestore/local/TargetDataTest.java diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/local/BaseTargetData.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/local/BaseTargetData.java new file mode 100644 index 00000000000..5c883ff4458 --- /dev/null +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/local/BaseTargetData.java @@ -0,0 +1,147 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package com.google.firebase.firestore.local; + +import static com.google.firebase.firestore.util.Preconditions.checkNotNull; + +import androidx.annotation.Nullable; +import com.google.firebase.firestore.core.TargetOrPipeline; +import com.google.firebase.firestore.model.SnapshotVersion; +import com.google.protobuf.ByteString; +import java.util.Objects; + +/** An abstract set of metadata that the store will need to keep track of for each target. */ +public abstract class BaseTargetData { + private final TargetOrPipeline target; + private final long sequenceNumber; + private final QueryPurpose purpose; + private final SnapshotVersion snapshotVersion; + private final SnapshotVersion lastLimboFreeSnapshotVersion; + private final ByteString resumeToken; + private final @Nullable Integer expectedCount; + + /** Creates a new BaseTargetData with the given values. */ + protected BaseTargetData( + TargetOrPipeline target, + long sequenceNumber, + QueryPurpose purpose, + SnapshotVersion snapshotVersion, + SnapshotVersion lastLimboFreeSnapshotVersion, + ByteString resumeToken, + @Nullable Integer expectedCount) { + this.target = checkNotNull(target); + this.sequenceNumber = sequenceNumber; + this.lastLimboFreeSnapshotVersion = lastLimboFreeSnapshotVersion; + this.purpose = purpose; + this.snapshotVersion = checkNotNull(snapshotVersion); + this.resumeToken = checkNotNull(resumeToken); + this.expectedCount = expectedCount; + } + + /** Creates a new target data instance with an updated sequence number. */ + public abstract BaseTargetData withSequenceNumber(long sequenceNumber); + + /** Creates a new target data instance with an updated resume token and snapshot version. */ + public abstract BaseTargetData withResumeToken( + ByteString resumeToken, SnapshotVersion snapshotVersion); + + /** Creates a new target data instance with an updated expected count. */ + public abstract BaseTargetData withExpectedCount(@Nullable Integer expectedCount); + + /** Creates a new target data instance with an updated last limbo free snapshot version number. */ + public abstract BaseTargetData withLastLimboFreeSnapshotVersion( + SnapshotVersion lastLimboFreeSnapshotVersion); + + public TargetOrPipeline getTarget() { + return target; + } + + public long getSequenceNumber() { + return sequenceNumber; + } + + public QueryPurpose getPurpose() { + return purpose; + } + + public SnapshotVersion getSnapshotVersion() { + return snapshotVersion; + } + + public ByteString getResumeToken() { + return resumeToken; + } + + @Nullable + public Integer getExpectedCount() { + return expectedCount; + } + + public SnapshotVersion getLastLimboFreeSnapshotVersion() { + return lastLimboFreeSnapshotVersion; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + + BaseTargetData that = (BaseTargetData) o; + return target.equals(that.target) + && sequenceNumber == that.sequenceNumber + && purpose.equals(that.purpose) + && snapshotVersion.equals(that.snapshotVersion) + && lastLimboFreeSnapshotVersion.equals(that.lastLimboFreeSnapshotVersion) + && resumeToken.equals(that.resumeToken) + && Objects.equals(expectedCount, that.expectedCount); + } + + @Override + public int hashCode() { + int result = target.hashCode(); + result = 31 * result + (int) sequenceNumber; + result = 31 * result + purpose.hashCode(); + result = 31 * result + snapshotVersion.hashCode(); + result = 31 * result + lastLimboFreeSnapshotVersion.hashCode(); + result = 31 * result + resumeToken.hashCode(); + result = 31 * result + Objects.hashCode(expectedCount); + return result; + } + + @Override + public String toString() { + return getClass().getSimpleName() + + "{" + + "target=" + + target + + ", sequenceNumber=" + + sequenceNumber + + ", purpose=" + + purpose + + ", snapshotVersion=" + + snapshotVersion + + ", lastLimboFreeSnapshotVersion=" + + lastLimboFreeSnapshotVersion + + ", resumeToken=" + + resumeToken + + ", expectedCount=" + + expectedCount + + '}'; + } +} diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/local/TargetData.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/local/TargetData.java index b024aae5220..329daac553d 100644 --- a/firebase-firestore/src/main/java/com/google/firebase/firestore/local/TargetData.java +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/local/TargetData.java @@ -14,32 +14,21 @@ package com.google.firebase.firestore.local; -import static com.google.firebase.firestore.util.Preconditions.checkNotNull; - import androidx.annotation.Nullable; import com.google.firebase.firestore.core.TargetOrPipeline; import com.google.firebase.firestore.model.SnapshotVersion; import com.google.firebase.firestore.remote.WatchStream; import com.google.protobuf.ByteString; -import java.util.Objects; /** An immutable set of metadata that the store will need to keep track of for each target. */ -public final class TargetData { - private final TargetOrPipeline target; +public final class TargetData extends BaseTargetData { private final int targetId; - private final long sequenceNumber; - private final QueryPurpose purpose; - private final SnapshotVersion snapshotVersion; - private final SnapshotVersion lastLimboFreeSnapshotVersion; - private final ByteString resumeToken; - private final @Nullable Integer expectedCount; /** * Creates a new TargetData with the given values. * * @param target The target being listened to. - * @param targetId The target id to which the target corresponds, assigned by the LocalStore for - * user queries or the SyncEngine for limbo queries. + * @param targetId The target id to which the target corresponds. * @param sequenceNumber The sequence number, denoting the last time this target was used. * @param purpose The purpose of the target. * @param snapshotVersion The latest snapshot version seen for this target. @@ -61,14 +50,15 @@ public TargetData( SnapshotVersion lastLimboFreeSnapshotVersion, ByteString resumeToken, @Nullable Integer expectedCount) { - this.target = checkNotNull(target); + super( + target, + sequenceNumber, + purpose, + snapshotVersion, + lastLimboFreeSnapshotVersion, + resumeToken, + expectedCount); this.targetId = targetId; - this.sequenceNumber = sequenceNumber; - this.lastLimboFreeSnapshotVersion = lastLimboFreeSnapshotVersion; - this.purpose = purpose; - this.snapshotVersion = checkNotNull(snapshotVersion); - this.resumeToken = checkNotNull(resumeToken); - this.expectedCount = expectedCount; } /** Convenience constructor for use when creating a TargetData for the first time. */ @@ -85,136 +75,87 @@ public TargetData( null); } - /** Creates a new target data instance with an updated sequence number. */ + public int getTargetId() { + return targetId; + } + + @Override public TargetData withSequenceNumber(long sequenceNumber) { return new TargetData( - target, + getTarget(), targetId, sequenceNumber, - purpose, - snapshotVersion, - lastLimboFreeSnapshotVersion, - resumeToken, - expectedCount); + getPurpose(), + getSnapshotVersion(), + getLastLimboFreeSnapshotVersion(), + getResumeToken(), + getExpectedCount()); } - /** Creates a new target data instance with an updated resume token and snapshot version. */ + @Override public TargetData withResumeToken(ByteString resumeToken, SnapshotVersion snapshotVersion) { return new TargetData( - target, + getTarget(), targetId, - sequenceNumber, - purpose, + getSequenceNumber(), + getPurpose(), snapshotVersion, - lastLimboFreeSnapshotVersion, + getLastLimboFreeSnapshotVersion(), resumeToken, /* expectedCount= */ null); } - /** Creates a new target data instance with an updated expected count. */ + @Override public TargetData withExpectedCount(@Nullable Integer expectedCount) { return new TargetData( - target, + getTarget(), targetId, - sequenceNumber, - purpose, - snapshotVersion, - lastLimboFreeSnapshotVersion, - resumeToken, + getSequenceNumber(), + getPurpose(), + getSnapshotVersion(), + getLastLimboFreeSnapshotVersion(), + getResumeToken(), expectedCount); } - /** Creates a new target data instance with an updated last limbo free snapshot version number. */ + @Override public TargetData withLastLimboFreeSnapshotVersion(SnapshotVersion lastLimboFreeSnapshotVersion) { return new TargetData( - target, + getTarget(), targetId, - sequenceNumber, - purpose, - snapshotVersion, + getSequenceNumber(), + getPurpose(), + getSnapshotVersion(), lastLimboFreeSnapshotVersion, - resumeToken, - expectedCount); - } - - public TargetOrPipeline getTarget() { - return target; + getResumeToken(), + getExpectedCount()); } TargetData withTarget(TargetOrPipeline target) { return new TargetData( target, targetId, - sequenceNumber, - purpose, - snapshotVersion, - lastLimboFreeSnapshotVersion, - resumeToken, - expectedCount); - } - - public int getTargetId() { - return targetId; - } - - public long getSequenceNumber() { - return sequenceNumber; - } - - public QueryPurpose getPurpose() { - return purpose; - } - - public SnapshotVersion getSnapshotVersion() { - return snapshotVersion; - } - - public ByteString getResumeToken() { - return resumeToken; - } - - @Nullable - public Integer getExpectedCount() { - return expectedCount; - } - - /** - * Returns the last snapshot version for which the associated view contained no limbo documents. - */ - public SnapshotVersion getLastLimboFreeSnapshotVersion() { - return lastLimboFreeSnapshotVersion; + getSequenceNumber(), + getPurpose(), + getSnapshotVersion(), + getLastLimboFreeSnapshotVersion(), + getResumeToken(), + getExpectedCount()); } @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { + if (!super.equals(o)) { return false; } - TargetData that = (TargetData) o; - return target.equals(that.target) - && targetId == that.targetId - && sequenceNumber == that.sequenceNumber - && purpose.equals(that.purpose) - && snapshotVersion.equals(that.snapshotVersion) - && lastLimboFreeSnapshotVersion.equals(that.lastLimboFreeSnapshotVersion) - && resumeToken.equals(that.resumeToken) - && Objects.equals(expectedCount, that.expectedCount); + return targetId == that.targetId; } @Override public int hashCode() { - int result = target.hashCode(); + int result = super.hashCode(); result = 31 * result + targetId; - result = 31 * result + (int) sequenceNumber; - result = 31 * result + purpose.hashCode(); - result = 31 * result + snapshotVersion.hashCode(); - result = 31 * result + lastLimboFreeSnapshotVersion.hashCode(); - result = 31 * result + resumeToken.hashCode(); - result = 31 * result + Objects.hashCode(expectedCount); return result; } @@ -222,21 +163,21 @@ public int hashCode() { public String toString() { return "TargetData{" + "target=" - + target + + getTarget() + ", targetId=" + targetId + ", sequenceNumber=" - + sequenceNumber + + getSequenceNumber() + ", purpose=" - + purpose + + getPurpose() + ", snapshotVersion=" - + snapshotVersion + + getSnapshotVersion() + ", lastLimboFreeSnapshotVersion=" - + lastLimboFreeSnapshotVersion + + getLastLimboFreeSnapshotVersion() + ", resumeToken=" - + resumeToken + + getResumeToken() + ", expectedCount=" - + expectedCount + + getExpectedCount() + '}'; } } diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteSerializer.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteSerializer.java index 1c82f0f9581..b19a6dd88ae 100644 --- a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteSerializer.java +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteSerializer.java @@ -32,7 +32,6 @@ import com.google.firebase.firestore.core.Target; import com.google.firebase.firestore.core.TargetOrPipeline; import com.google.firebase.firestore.local.QueryPurpose; -import com.google.firebase.firestore.local.TargetData; import com.google.firebase.firestore.model.DatabaseId; import com.google.firebase.firestore.model.DocumentKey; import com.google.firebase.firestore.model.FieldPath; @@ -476,7 +475,7 @@ public MutationResult decodeMutationResult( // Queries @Nullable - public Map encodeListenRequestLabels(TargetData targetData) { + public Map encodeListenRequestLabels(RemoteTargetData targetData) { @Nullable String value = encodeLabel(targetData.getPurpose()); if (value == null) { return null; @@ -503,7 +502,7 @@ private String encodeLabel(QueryPurpose purpose) { } } - public com.google.firestore.v1.Target encodeTarget(TargetData targetData) { + public com.google.firestore.v1.Target encodeTarget(RemoteTargetData targetData) { com.google.firestore.v1.Target.Builder builder = com.google.firestore.v1.Target.newBuilder(); TargetOrPipeline target = targetData.getTarget(); @@ -520,7 +519,7 @@ public com.google.firestore.v1.Target encodeTarget(TargetData targetData) { builder.setQuery(encodeQueryTarget(target.target())); } - builder.setTargetId(targetData.getTargetId()); + builder.setTargetId(targetData.getTargetId().value()); if (targetData.getResumeToken().isEmpty() && targetData.getSnapshotVersion().compareTo(SnapshotVersion.NONE) > 0) { diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteStore.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteStore.java index 0e87db1c80b..4116ddc8013 100644 --- a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteStore.java +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteStore.java @@ -27,7 +27,6 @@ import com.google.firebase.firestore.core.OnlineState; import com.google.firebase.firestore.core.Query; import com.google.firebase.firestore.core.TargetIdGenerator; -import com.google.firebase.firestore.core.TargetOrPipeline; import com.google.firebase.firestore.core.Transaction; import com.google.firebase.firestore.local.LocalStore; import com.google.firebase.firestore.local.QueryPurpose; @@ -136,7 +135,7 @@ public interface RemoteStoreCallback { * removed with unlistens are removed eagerly without waiting for confirmation from the listen * stream. */ - private final Map listenTargets; + private final Map listenTargets; private final Map targetIdMapSdkToRemote; private final Map targetIdMapRemoteToSdk; @@ -371,81 +370,56 @@ public void handleCredentialChange() { } } - private int generateRemoteTargetId(int sdkTargetId) { + private RemoteTargetId generateRemoteTargetId(int sdkTargetId) { if (sdkTargetId % 2 != 0) { - return syncEngineTargetIdGenerator.nextId(); + return RemoteTargetId.from(syncEngineTargetIdGenerator.nextId()); } else { - return targetCacheTargetIdGenerator.nextId(); + return RemoteTargetId.from(targetCacheTargetIdGenerator.nextId()); } } + private RemoteTargetId allocateRemoteTargetId(int sdkTargetId) { + RemoteTargetId currentRemoteTargetId = targetIdMapSdkToRemote.get(sdkTargetId); + if (currentRemoteTargetId != null) { + targetIdMapRemoteToSdk.remove(currentRemoteTargetId); + } + + RemoteTargetId newRemoteTargetId = generateRemoteTargetId(sdkTargetId); + targetIdMapSdkToRemote.put(sdkTargetId, newRemoteTargetId); + targetIdMapRemoteToSdk.put(newRemoteTargetId, sdkTargetId); + return newRemoteTargetId; + } + // Watch Stream /** * Listens to the target identified by the given TargetData. * - *

It is a no-op if the target of the given query data is already being listened to. + *

+ * It is a no-op if the target of the given query data is already being listened + * to. */ - private String getPipelineCanonicalIdExceptSort( - com.google.firebase.firestore.RealtimePipeline p) { - String canonicalId = p.toString(); - String[] stages = canonicalId.split("\\|"); - List stripped = new ArrayList<>(); - for (String stage : stages) { - if (!stage.startsWith("sort")) { - stripped.add(stage); - } - } - return String.join("|", stripped); - } - public void listen(TargetData targetData) { + // Get any remote target ID currently mapped to the targetData int sdkTargetId = targetData.getTargetId(); RemoteTargetId remoteTargetId = targetIdMapSdkToRemote.get(sdkTargetId); - if (remoteTargetId == null) { - TargetOrPipeline top = targetData.getTarget(); - String topCanonicalId = - top.isPipeline() - ? getPipelineCanonicalIdExceptSort( - top.pipeline$com_google_firebase_firebase_firestore()) - : null; - - for (Map.Entry entry : listenTargets.entrySet()) { - TargetOrPipeline activeTop = entry.getValue().getTarget(); - if (top.isTarget() && activeTop.isTarget()) { - if (top.target().equals(activeTop.target())) { - remoteTargetId = entry.getKey(); - targetIdMapSdkToRemote.put(sdkTargetId, remoteTargetId); - break; - } - } else if (top.isPipeline() && activeTop.isPipeline()) { - if (topCanonicalId.equals( - getPipelineCanonicalIdExceptSort( - activeTop.pipeline$com_google_firebase_firebase_firestore()))) { - remoteTargetId = entry.getKey(); - targetIdMapSdkToRemote.put(sdkTargetId, remoteTargetId); - break; - } - } - } - } - + // If remote store is still listening for this remote target ID, this is a + // no-op. if (remoteTargetId != null && listenTargets.containsKey(remoteTargetId)) { return; } - if (remoteTargetId != null) { - targetIdMapRemoteToSdk.remove(remoteTargetId); - } - remoteTargetId = RemoteTargetId.from(generateRemoteTargetId(sdkTargetId)); - targetIdMapSdkToRemote.put(sdkTargetId, remoteTargetId); - targetIdMapRemoteToSdk.put(remoteTargetId, sdkTargetId); + // Generate and map a new remote ID to the SDK target ID + remoteTargetId = allocateRemoteTargetId(sdkTargetId); + + Logger.debug( + LOG_TAG, "listen mapping SDK target ID to remote: %d -> %s", sdkTargetId, remoteTargetId); - TargetData remoteTargetData = - new TargetData( + RemoteTargetData remoteTargetData = + new RemoteTargetData( targetData.getTarget(), - remoteTargetId.value(), + remoteTargetId, targetData.getSequenceNumber(), targetData.getPurpose(), targetData.getSnapshotVersion(), @@ -462,16 +436,28 @@ public void listen(TargetData targetData) { } } - private void sendWatchRequest(TargetData targetData) { - RemoteTargetId remoteTargetId = RemoteTargetId.from(targetData.getTargetId()); - watchChangeAggregator.recordPendingTargetRequest(remoteTargetId.value()); - if (!targetData.getResumeToken().isEmpty() - || targetData.getSnapshotVersion().compareTo(SnapshotVersion.NONE) > 0) { + private void sendWatchRequest(RemoteTargetData remoteTargetData) { + RemoteTargetId remoteTargetId = remoteTargetData.getTargetId(); + watchChangeAggregator.recordPendingTargetRequest(remoteTargetId); + + if (!remoteTargetData.getResumeToken().isEmpty() + || remoteTargetData.getSnapshotVersion().compareTo(SnapshotVersion.NONE) > 0) { + + Integer sdkTargetId = this.targetIdMapRemoteToSdk.get(remoteTargetId); + + if (sdkTargetId == null) { + Logger.debug(LOG_TAG, "SDK target ID not found for remote ID: %s", remoteTargetId); + + // There's already a new remoteStoreListen request for the original + // target, so ignore this. + return; + } + int expectedCount = this.getRemoteKeysForTarget(remoteTargetId).size(); - targetData = targetData.withExpectedCount(expectedCount); + remoteTargetData = remoteTargetData.withExpectedCount(expectedCount); } - watchStream.watchQuery(targetData); + watchStream.watchQuery(remoteTargetData); } /** @@ -484,16 +470,20 @@ private void sendWatchRequest(TargetData targetData) { */ public void stopListening(int sdkTargetId) { RemoteTargetId remoteTargetId = targetIdMapSdkToRemote.remove(sdkTargetId); + Logger.debug( + LOG_TAG, + "stopListening removing mapping of SDK target ID to remote: %d -> %s", + sdkTargetId, + remoteTargetId); + hardAssert( remoteTargetId != null, "stopListening called on target not currently watched: %d", sdkTargetId); + targetIdMapRemoteToSdk.remove(remoteTargetId); - TargetData remoteTargetData = listenTargets.remove(remoteTargetId); - hardAssert( - remoteTargetData != null, - "stopListening called on target not currently watched: %d", - sdkTargetId); + targetIdMapSdkToRemote.remove(sdkTargetId); + listenTargets.remove(remoteTargetId); // The watch stream might not be started if we're in a disconnected state if (watchStream.isOpen()) { @@ -513,8 +503,8 @@ public void stopListening(int sdkTargetId) { } private void sendUnwatchRequest(RemoteTargetId remoteTargetId) { - watchChangeAggregator.recordPendingTargetRequest(remoteTargetId.value()); - watchStream.unwatchTarget(remoteTargetId.value()); + watchChangeAggregator.recordPendingTargetRequest(remoteTargetId); + watchStream.unwatchTarget(remoteTargetId); } /** @@ -552,7 +542,7 @@ private void startWatchStream() { private void handleWatchStreamOpen() { // Restore any existing watches. - for (TargetData targetData : listenTargets.values()) { + for (RemoteTargetData targetData : listenTargets.values()) { sendWatchRequest(targetData); } } @@ -692,7 +682,7 @@ private void raiseWatchSnapshot(SnapshotVersion snapshotVersion) { int sdkTargetId = entry.getKey(); RemoteTargetId remoteTargetId = targetIdMapSdkToRemote.get(sdkTargetId); if (remoteTargetId != null) { - TargetData remoteTargetData = this.listenTargets.get(remoteTargetId); + RemoteTargetData remoteTargetData = this.listenTargets.get(remoteTargetId); // A watched target might have been removed already. if (remoteTargetData != null) { this.listenTargets.put( @@ -709,7 +699,7 @@ private void raiseWatchSnapshot(SnapshotVersion snapshotVersion) { int sdkTargetId = entry.getKey(); RemoteTargetId remoteTargetId = targetIdMapSdkToRemote.get(sdkTargetId); if (remoteTargetId != null) { - TargetData remoteTargetData = this.listenTargets.get(remoteTargetId); + RemoteTargetData remoteTargetData = this.listenTargets.get(remoteTargetId); // A watched target might have been removed already. if (remoteTargetData != null) { // Clear the resume token for the query, since we're in a known mismatch state. @@ -727,10 +717,10 @@ private void raiseWatchSnapshot(SnapshotVersion snapshotVersion) { // this way without impacting future listens of this target (that might happen for example // on // reconnect). - TargetData requestTargetData = - new TargetData( + RemoteTargetData requestTargetData = + new RemoteTargetData( remoteTargetData.getTarget(), - remoteTargetId.value(), + remoteTargetId, remoteTargetData.getSequenceNumber(), /* purpose= */ entry.getValue()); this.sendWatchRequest(requestTargetData); @@ -939,7 +929,7 @@ public ImmutableSortedSet getRemoteKeysForTarget(RemoteTargetId rem @Nullable @Override - public TargetData getTargetDataForTarget(RemoteTargetId remoteTargetId) { + public RemoteTargetData getTargetDataForTarget(RemoteTargetId remoteTargetId) { return this.listenTargets.get(remoteTargetId); } diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteTargetData.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteTargetData.java new file mode 100644 index 00000000000..fc6cb96fc14 --- /dev/null +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteTargetData.java @@ -0,0 +1,156 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package com.google.firebase.firestore.remote; + +import androidx.annotation.Nullable; +import com.google.firebase.firestore.core.TargetOrPipeline; +import com.google.firebase.firestore.local.BaseTargetData; +import com.google.firebase.firestore.local.QueryPurpose; +import com.google.firebase.firestore.model.SnapshotVersion; +import com.google.protobuf.ByteString; +import java.util.Objects; + +/** An immutable set of metadata that the remote store will need to keep track of for each target. */ +public final class RemoteTargetData extends BaseTargetData { + private final RemoteTargetId targetId; + + public RemoteTargetData( + TargetOrPipeline target, + RemoteTargetId targetId, + long sequenceNumber, + QueryPurpose purpose, + SnapshotVersion snapshotVersion, + SnapshotVersion lastLimboFreeSnapshotVersion, + ByteString resumeToken, + @Nullable Integer expectedCount) { + super( + target, + sequenceNumber, + purpose, + snapshotVersion, + lastLimboFreeSnapshotVersion, + resumeToken, + expectedCount); + this.targetId = targetId; + } + + public RemoteTargetData( + TargetOrPipeline target, RemoteTargetId targetId, long sequenceNumber, QueryPurpose purpose) { + this( + target, + targetId, + sequenceNumber, + purpose, + SnapshotVersion.NONE, + SnapshotVersion.NONE, + WatchStream.EMPTY_RESUME_TOKEN, + null); + } + + public RemoteTargetId getTargetId() { + return targetId; + } + + @Override + public RemoteTargetData withSequenceNumber(long sequenceNumber) { + return new RemoteTargetData( + getTarget(), + targetId, + sequenceNumber, + getPurpose(), + getSnapshotVersion(), + getLastLimboFreeSnapshotVersion(), + getResumeToken(), + getExpectedCount()); + } + + @Override + public RemoteTargetData withResumeToken(ByteString resumeToken, SnapshotVersion snapshotVersion) { + return new RemoteTargetData( + getTarget(), + targetId, + getSequenceNumber(), + getPurpose(), + snapshotVersion, + getLastLimboFreeSnapshotVersion(), + resumeToken, + /* expectedCount= */ null); + } + + @Override + public RemoteTargetData withExpectedCount(@Nullable Integer expectedCount) { + return new RemoteTargetData( + getTarget(), + targetId, + getSequenceNumber(), + getPurpose(), + getSnapshotVersion(), + getLastLimboFreeSnapshotVersion(), + getResumeToken(), + expectedCount); + } + + @Override + public RemoteTargetData withLastLimboFreeSnapshotVersion( + SnapshotVersion lastLimboFreeSnapshotVersion) { + return new RemoteTargetData( + getTarget(), + targetId, + getSequenceNumber(), + getPurpose(), + getSnapshotVersion(), + lastLimboFreeSnapshotVersion, + getResumeToken(), + getExpectedCount()); + } + + @Override + public boolean equals(Object o) { + if (!super.equals(o)) { + return false; + } + RemoteTargetData that = (RemoteTargetData) o; + return Objects.equals(targetId, that.targetId); + } + + @Override + public int hashCode() { + int result = super.hashCode(); + result = 31 * result + Objects.hashCode(targetId); + return result; + } + + @Override + public String toString() { + return "RemoteTargetData{" + + "target=" + + getTarget() + + ", targetId=" + + targetId + + ", sequenceNumber=" + + getSequenceNumber() + + ", purpose=" + + getPurpose() + + ", snapshotVersion=" + + getSnapshotVersion() + + ", lastLimboFreeSnapshotVersion=" + + getLastLimboFreeSnapshotVersion() + + ", resumeToken=" + + getResumeToken() + + ", expectedCount=" + + getExpectedCount() + + '}'; + } +} diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/WatchChangeAggregator.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/WatchChangeAggregator.java index d36432d8c9d..2c9b9fe7630 100644 --- a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/WatchChangeAggregator.java +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/WatchChangeAggregator.java @@ -21,7 +21,6 @@ import com.google.firebase.database.collection.ImmutableSortedSet; import com.google.firebase.firestore.core.DocumentViewChange; import com.google.firebase.firestore.local.QueryPurpose; -import com.google.firebase.firestore.local.TargetData; import com.google.firebase.firestore.model.DatabaseId; import com.google.firebase.firestore.model.DocumentKey; import com.google.firebase.firestore.model.MutableDocument; @@ -58,7 +57,7 @@ public interface TargetMetadataProvider { * become inactive. */ @Nullable - TargetData getTargetDataForTarget(RemoteTargetId targetId); + RemoteTargetData getTargetDataForTarget(RemoteTargetId targetId); /** * Translates a RemoteTargetId to its stable SDK TargetId. Returns the remoteTargetId's value @@ -202,7 +201,7 @@ public void handleExistenceFilter(ExistenceFilterWatchChange watchChange) { RemoteTargetId targetId = RemoteTargetId.from(watchChange.getTargetId()); int expectedCount = watchChange.getExistenceFilter().getCount(); - TargetData targetData = queryDataForActiveTarget(targetId); + RemoteTargetData targetData = queryDataForActiveTarget(targetId); if (targetData != null) { ResourcePath singleDocPath = targetData.getTarget().getSingleDocPath(); if (singleDocPath != null) { @@ -334,7 +333,7 @@ public RemoteEvent createRemoteEvent(SnapshotVersion snapshotVersion) { RemoteTargetId targetId = entry.getKey(); TargetState targetState = entry.getValue(); - TargetData targetData = queryDataForActiveTarget(targetId); + RemoteTargetData targetData = queryDataForActiveTarget(targetId); if (targetData != null) { ResourcePath singleDocPath = targetData.getTarget().getSingleDocPath(); if (targetState.isCurrent() && singleDocPath != null) { @@ -371,7 +370,7 @@ public RemoteEvent createRemoteEvent(SnapshotVersion snapshotVersion) { boolean isOnlyLimboTarget = true; for (RemoteTargetId targetId : targets) { - TargetData targetData = queryDataForActiveTarget(targetId); + RemoteTargetData targetData = queryDataForActiveTarget(targetId); if (targetData != null && !targetData.getPurpose().equals(QueryPurpose.LIMBO_RESOLUTION)) { isOnlyLimboTarget = false; break; @@ -480,9 +479,9 @@ private int getCurrentDocumentCountForTarget(RemoteTargetId targetId) { * Increment the number of acks needed from watch before we can consider the server to be * 'in-sync' with the client's active targets. */ - void recordPendingTargetRequest(int targetId) { + void recordPendingTargetRequest(RemoteTargetId targetId) { // For each request we get we need to record we need a response for it. - TargetState targetState = ensureTargetState(RemoteTargetId.from(targetId)); + TargetState targetState = ensureTargetState(targetId); targetState.recordPendingTargetRequest(); } @@ -520,7 +519,7 @@ private boolean isActiveTarget(RemoteTargetId targetId) { * interested in that has no outstanding target change requests). */ @Nullable - private TargetData queryDataForActiveTarget(RemoteTargetId targetId) { + private RemoteTargetData queryDataForActiveTarget(RemoteTargetId targetId) { TargetState targetState = targetStates.get(targetId); return targetState != null && targetState.isPending() ? null diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/WatchStream.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/WatchStream.java index 515fefa1099..83fa1a5c005 100644 --- a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/WatchStream.java +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/WatchStream.java @@ -16,7 +16,6 @@ import static com.google.firebase.firestore.util.Assert.hardAssert; -import com.google.firebase.firestore.local.TargetData; import com.google.firebase.firestore.model.SnapshotVersion; import com.google.firebase.firestore.util.AsyncQueue; import com.google.firebase.firestore.util.AsyncQueue.TimerId; @@ -72,7 +71,7 @@ interface Callback extends AbstractStream.StreamCallback { * will be included in the request. Results that affect the query will be streamed back as * WatchChange messages that reference the targetID included in query. */ - public void watchQuery(TargetData targetData) { + public void watchQuery(RemoteTargetData targetData) { hardAssert(isOpen(), "Watching queries requires an open stream"); ListenRequest.Builder request = ListenRequest.newBuilder() @@ -88,12 +87,12 @@ public void watchQuery(TargetData targetData) { } /** Unregisters interest in the results of the query associated with the given target ID. */ - public void unwatchTarget(int targetId) { + public void unwatchTarget(RemoteTargetId targetId) { hardAssert(isOpen(), "Unwatching targets requires an open stream"); ListenRequest request = ListenRequest.newBuilder() .setDatabase(serializer.databaseName()) - .setRemoveTarget(targetId) + .setRemoveTarget(targetId.value()) .build(); writeRequest(request); diff --git a/firebase-firestore/src/test/java/com/google/firebase/firestore/local/TargetDataTest.java b/firebase-firestore/src/test/java/com/google/firebase/firestore/local/TargetDataTest.java new file mode 100644 index 00000000000..a343aa6dcd6 --- /dev/null +++ b/firebase-firestore/src/test/java/com/google/firebase/firestore/local/TargetDataTest.java @@ -0,0 +1,146 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package com.google.firebase.firestore.local; + +import static com.google.firebase.firestore.testutil.TestUtil.query; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; + +import com.google.firebase.firestore.core.TargetOrPipeline; +import com.google.firebase.firestore.model.SnapshotVersion; +import com.google.firebase.firestore.remote.RemoteTargetData; +import com.google.firebase.firestore.remote.RemoteTargetId; +import com.google.firebase.firestore.remote.WatchStream; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.robolectric.RobolectricTestRunner; +import org.robolectric.annotation.Config; + +@RunWith(RobolectricTestRunner.class) +@Config(manifest = Config.NONE) +public class TargetDataTest { + + @Test + public void testConstructorWithInt() { + TargetOrPipeline target = new TargetOrPipeline.TargetWrapper(query("c").toTarget()); + TargetData targetData = new TargetData(target, 42, 1, QueryPurpose.LISTEN); + + assertEquals(42, (int) targetData.getTargetId()); + } + + @Test + public void testConstructorWithRemoteTargetId() { + TargetOrPipeline target = new TargetOrPipeline.TargetWrapper(query("c").toTarget()); + RemoteTargetId remoteTargetId = RemoteTargetId.from(42); + RemoteTargetData targetData = + new RemoteTargetData( + target, + remoteTargetId, + 1, + QueryPurpose.LISTEN, + SnapshotVersion.NONE, + SnapshotVersion.NONE, + WatchStream.EMPTY_RESUME_TOKEN, + null); + + assertEquals(remoteTargetId, targetData.getTargetId()); + } + + @Test + public void testWithMethodsPreserveRemoteTargetId() { + TargetOrPipeline target = new TargetOrPipeline.TargetWrapper(query("c").toTarget()); + RemoteTargetId remoteTargetId = RemoteTargetId.from(42); + RemoteTargetData targetData = + new RemoteTargetData( + target, + remoteTargetId, + 1, + QueryPurpose.LISTEN, + SnapshotVersion.NONE, + SnapshotVersion.NONE, + WatchStream.EMPTY_RESUME_TOKEN, + null); + + RemoteTargetData updated = targetData.withSequenceNumber(2); + assertEquals(remoteTargetId, updated.getTargetId()); + + updated = targetData.withResumeToken(WatchStream.EMPTY_RESUME_TOKEN, SnapshotVersion.NONE); + assertEquals(remoteTargetId, updated.getTargetId()); + + updated = targetData.withExpectedCount(10); + assertEquals(remoteTargetId, updated.getTargetId()); + + updated = targetData.withLastLimboFreeSnapshotVersion(SnapshotVersion.NONE); + assertEquals(remoteTargetId, updated.getTargetId()); + } + + @Test + public void testEqualsAndHashCode() { + TargetOrPipeline target = new TargetOrPipeline.TargetWrapper(query("c").toTarget()); + RemoteTargetId remoteTargetId1 = RemoteTargetId.from(42); + RemoteTargetId remoteTargetId2 = RemoteTargetId.from(42); + RemoteTargetId remoteTargetId3 = RemoteTargetId.from(43); + + RemoteTargetData targetData1 = + new RemoteTargetData( + target, + remoteTargetId1, + 1, + QueryPurpose.LISTEN, + SnapshotVersion.NONE, + SnapshotVersion.NONE, + WatchStream.EMPTY_RESUME_TOKEN, + null); + + RemoteTargetData targetData2 = + new RemoteTargetData( + target, + remoteTargetId2, + 1, + QueryPurpose.LISTEN, + SnapshotVersion.NONE, + SnapshotVersion.NONE, + WatchStream.EMPTY_RESUME_TOKEN, + null); + + RemoteTargetData targetData3 = + new RemoteTargetData( + target, + remoteTargetId3, + 1, + QueryPurpose.LISTEN, + SnapshotVersion.NONE, + SnapshotVersion.NONE, + WatchStream.EMPTY_RESUME_TOKEN, + null); + + TargetData targetDataInt = + new TargetData( + target, + 42, + 1, + QueryPurpose.LISTEN, + SnapshotVersion.NONE, + SnapshotVersion.NONE, + WatchStream.EMPTY_RESUME_TOKEN, + null); + + assertEquals(targetData1, targetData2); + assertEquals(targetData1.hashCode(), targetData2.hashCode()); + + assertNotEquals(targetData1, targetData3); + assertNotEquals(targetData1, targetDataInt); + } +} diff --git a/firebase-firestore/src/test/java/com/google/firebase/firestore/remote/MockDatastore.java b/firebase-firestore/src/test/java/com/google/firebase/firestore/remote/MockDatastore.java index 0c1908eb9bc..8919f810b5a 100644 --- a/firebase-firestore/src/test/java/com/google/firebase/firestore/remote/MockDatastore.java +++ b/firebase-firestore/src/test/java/com/google/firebase/firestore/remote/MockDatastore.java @@ -17,7 +17,6 @@ import static com.google.firebase.firestore.util.Assert.hardAssert; import com.google.firebase.firestore.core.DatabaseInfo; -import com.google.firebase.firestore.local.TargetData; import com.google.firebase.firestore.model.SnapshotVersion; import com.google.firebase.firestore.model.mutation.Mutation; import com.google.firebase.firestore.model.mutation.MutationResult; @@ -44,7 +43,7 @@ private class MockWatchStream extends WatchStream { private boolean open; /** Tracks the currently active watch targets as sent over the watch stream. */ - private final Map activeTargets = new HashMap<>(); + private final Map activeTargets = new HashMap<>(); MockWatchStream(AsyncQueue workerQueue, WatchStream.Callback listener) { super(/* channel= */ null, workerQueue, serializer, listener); @@ -75,7 +74,7 @@ public boolean isOpen() { } @Override - public void watchQuery(TargetData targetData) { + public void watchQuery(RemoteTargetData targetData) { String resumeToken = Util.toDebugString(targetData.getResumeToken()); SpecTestCase.log( " watchQuery(" @@ -86,7 +85,7 @@ public void watchQuery(TargetData targetData) { + resumeToken + ")"); // Snapshot version is ignored on the wire - TargetData sentTargetData = + RemoteTargetData sentTargetData = targetData.withResumeToken(targetData.getResumeToken(), SnapshotVersion.NONE); if (targetData.getExpectedCount() != null) { @@ -94,13 +93,13 @@ public void watchQuery(TargetData targetData) { } watchStreamRequestCount += 1; - this.activeTargets.put(targetData.getTargetId(), sentTargetData); + this.activeTargets.put(targetData.getTargetId().value(), sentTargetData); } @Override - public void unwatchTarget(int targetId) { - SpecTestCase.log(" unwatchTarget(" + targetId + ")"); - this.activeTargets.remove(targetId); + public void unwatchTarget(RemoteTargetId targetId) { + SpecTestCase.log(" unwatchTarget(" + targetId.value() + ")"); + this.activeTargets.remove(targetId.value()); } /** Injects a stream failure as though it had come from the backend. */ @@ -277,7 +276,7 @@ public void failWatchStream(Status status) { } /** Returns the map of active targets on the watch stream, keyed by target ID. */ - public Map activeTargets() { + public Map activeTargets() { // Make a defensive copy as the watch stream continues to modify the Map of active targets. return new HashMap<>(watchStream.activeTargets); } diff --git a/firebase-firestore/src/test/java/com/google/firebase/firestore/remote/RemoteEventTest.java b/firebase-firestore/src/test/java/com/google/firebase/firestore/remote/RemoteEventTest.java index 8a0b4f9320e..3d1dba67a20 100644 --- a/firebase-firestore/src/test/java/com/google/firebase/firestore/remote/RemoteEventTest.java +++ b/firebase-firestore/src/test/java/com/google/firebase/firestore/remote/RemoteEventTest.java @@ -32,7 +32,6 @@ import static org.junit.Assert.fail; import com.google.firebase.database.collection.ImmutableSortedSet; -import com.google.firebase.firestore.local.TargetData; import com.google.firebase.firestore.model.DatabaseId; import com.google.firebase.firestore.model.DocumentKey; import com.google.firebase.firestore.model.MutableDocument; @@ -84,7 +83,7 @@ public void before() { * changes are DocumentWatchChange and WatchTargetChange. */ private WatchChangeAggregator createAggregator( - Map targetMap, + Map targetMap, Map outstandingResponses, ImmutableSortedSet existingKeys, WatchChange... watchChanges) { @@ -98,7 +97,7 @@ private WatchChangeAggregator createAggregator( List targetIds = new ArrayList<>(); - for (Map.Entry entry : targetMap.entrySet()) { + for (Map.Entry entry : targetMap.entrySet()) { targetIds.add(entry.getKey()); targetMetadataProvider.setSyncedKeys(entry.getValue(), existingKeys); } @@ -141,7 +140,7 @@ private WatchChangeAggregator createAggregator( */ private RemoteEvent createRemoteEvent( long snapshotVersion, - Map targetMap, + Map targetMap, Map outstandingResponses, ImmutableSortedSet existingKeys, WatchChange... watchChanges) { @@ -152,7 +151,7 @@ private RemoteEvent createRemoteEvent( @Test public void testWillAccumulateDocumentAddedAndRemovedEvents() { - Map targetMap = activeQueries(1, 2, 3, 4, 5, 6); + Map targetMap = activeQueries(1, 2, 3, 4, 5, 6); MutableDocument existingDoc = doc("docs/1", 1, map("value", 1)); MutableDocument newDoc = doc("docs/2", 2, map("value", 2)); @@ -194,7 +193,7 @@ public void testWillAccumulateDocumentAddedAndRemovedEvents() { @Test public void testWillIgnoreEventsForPendingTargets() { - Map targetMap = activeQueries(1); + Map targetMap = activeQueries(1); MutableDocument doc1 = doc("docs/1", 1, map("value", 1)); MutableDocument doc2 = doc("docs/2", 2, map("value", 2)); @@ -222,7 +221,7 @@ public void testWillIgnoreEventsForPendingTargets() { @Test public void testWillIgnoreEventsForRemovedTargets() { - Map targetMap = activeQueries(); + Map targetMap = activeQueries(); MutableDocument doc1 = doc("docs/1", 1, map("value", 1)); @@ -244,7 +243,7 @@ public void testWillIgnoreEventsForRemovedTargets() { @Test public void testWillKeepResetMappingEvenWithUpdates() { - Map targetMap = activeQueries(1); + Map targetMap = activeQueries(1); MutableDocument doc1 = doc("docs/1", 1, map("value", 1)); MutableDocument doc2 = doc("docs/2", 2, map("value", 2)); @@ -287,7 +286,7 @@ public void testWillKeepResetMappingEvenWithUpdates() { @Test public void testWillHandleSingleReset() { - Map targetMap = activeQueries(1); + Map targetMap = activeQueries(1); WatchChangeAggregator aggregator = createAggregator(targetMap, noOutstandingResponses, noExistingKeys); @@ -309,7 +308,7 @@ public void testWillHandleSingleReset() { @Test public void testWillHandleTargetAddAndRemovalInSameBatch() { - Map targetMap = activeQueries(1, 2); + Map targetMap = activeQueries(1, 2); MutableDocument doc1a = doc("docs/1", 1, map("value", 1)); MutableDocument doc1b = doc("docs/1", 1, map("value", 2)); @@ -335,7 +334,7 @@ public void testWillHandleTargetAddAndRemovalInSameBatch() { @Test public void testTargetCurrentChangeWillMarkTheTargetCurrent() { - Map targetMap = activeQueries(1); + Map targetMap = activeQueries(1); WatchChange change = new WatchTargetChange(WatchTargetChangeType.Current, asList(1)); @@ -351,7 +350,7 @@ public void testTargetCurrentChangeWillMarkTheTargetCurrent() { @Test public void testTargetAddedChangeWillResetPreviousState() { - Map targetMap = activeQueries(1, 3); + Map targetMap = activeQueries(1, 3); MutableDocument doc1 = doc("docs/1", 1, map("value", 1)); MutableDocument doc2 = doc("docs/2", 2, map("value", 2)); @@ -400,7 +399,7 @@ public void testTargetAddedChangeWillResetPreviousState() { @Test public void testNoChangeWillStillMarkTheAffectedTargets() { - Map targetMap = activeQueries(1); + Map targetMap = activeQueries(1); WatchChangeAggregator aggregator = createAggregator(targetMap, noOutstandingResponses, noExistingKeys); @@ -419,7 +418,7 @@ public void testNoChangeWillStillMarkTheAffectedTargets() { @Test public void testExistenceFilterMismatchClearsTarget() { - Map targetMap = activeQueries(1, 2); + Map targetMap = activeQueries(1, 2); MutableDocument doc1 = doc("docs/1", 1, map("value", 1)); MutableDocument doc2 = doc("docs/2", 2, map("value", 2)); @@ -467,7 +466,7 @@ public void testExistenceFilterMismatchClearsTarget() { @Test public void existenceFilterMismatchWithSuccessfulBloomFilterApplication() { - Map targetMap = activeQueries(1, 2); + Map targetMap = activeQueries(1, 2); MutableDocument doc1 = doc("docs/1", 1, map("value", 1)); MutableDocument doc2 = doc("docs/2", 2, map("value", 2)); @@ -521,7 +520,7 @@ public void existenceFilterMismatchWithSuccessfulBloomFilterApplication() { @Test public void existenceFilterMismatchWithBloomFilterFalsePositiveResult() { - Map targetMap = activeQueries(1, 2); + Map targetMap = activeQueries(1, 2); MutableDocument doc1 = doc("docs/1", 1, map("value", 1)); MutableDocument doc2 = doc("docs/2", 2, map("value", 2)); @@ -577,7 +576,7 @@ public void existenceFilterMismatchWithBloomFilterFalsePositiveResult() { @Test public void testExistenceFilterMismatchRemovesCurrentChanges() { - Map targetMap = activeQueries(1); + Map targetMap = activeQueries(1); WatchChangeAggregator aggregator = createAggregator(targetMap, noOutstandingResponses, noExistingKeys); @@ -609,7 +608,7 @@ public void testExistenceFilterMismatchRemovesCurrentChanges() { @Test public void testDocumentUpdate() { - Map targetMap = activeQueries(1); + Map targetMap = activeQueries(1); MutableDocument doc1 = doc("docs/1", 1, map("value", 1)); WatchChange change1 = new DocumentChange(asList(1), emptyList(), doc1.getKey(), doc1); @@ -662,7 +661,7 @@ public void testDocumentUpdate() { @Test public void testResumeTokenHandledPerTarget() { - Map targetMap = activeQueries(1, 2); + Map targetMap = activeQueries(1, 2); WatchChangeAggregator aggregator = createAggregator(targetMap, noOutstandingResponses, noExistingKeys); @@ -688,7 +687,7 @@ public void testResumeTokenHandledPerTarget() { @Test public void testLastResumeTokenWins() { - Map targetMap = activeQueries(1, 2); + Map targetMap = activeQueries(1, 2); WatchChangeAggregator aggregator = createAggregator(targetMap, noOutstandingResponses, noExistingKeys); @@ -719,7 +718,7 @@ public void testLastResumeTokenWins() { @Test public void testSynthesizeDeletes() { - Map targetMap = activeLimboQueries("foo/doc", 1); + Map targetMap = activeLimboQueries("foo/doc", 1); WatchTargetChange shouldSynthesize = new WatchTargetChange(WatchTargetChangeType.Current, asList(1)); @@ -736,7 +735,7 @@ public void testSynthesizeDeletes() { @Test public void testDoesNotSynthesizeDeleteInWrongState() { - Map targetMap = activeLimboQueries("foo/doc", 1); + Map targetMap = activeLimboQueries("foo/doc", 1); WatchTargetChange wrongState = new WatchTargetChange(WatchTargetChangeType.NoChange, asList(1)); @@ -748,7 +747,7 @@ public void testDoesNotSynthesizeDeleteInWrongState() { @Test public void testDoesNotSynthesizeDeleteWithExistingDocument() { - Map targetMap = activeLimboQueries("foo/doc", 1); + Map targetMap = activeLimboQueries("foo/doc", 1); WatchTargetChange hasDocument = new WatchTargetChange(WatchTargetChangeType.Current, asList(1)); @@ -761,7 +760,7 @@ public void testDoesNotSynthesizeDeleteWithExistingDocument() { @Test public void testSeparatesUpdates() { - Map targetMap = activeQueries(1); + Map targetMap = activeQueries(1); MutableDocument newDoc = doc("docs/new", 1, map("key", "value")); DocumentChange newDocChange = @@ -797,7 +796,7 @@ public void testSeparatesUpdates() { @Test public void testTracksLimboDocuments() { - Map listens = activeQueries(1); + Map listens = activeQueries(1); listens.putAll(activeLimboQueries("doc/2", 2)); // Add 3 docs: 1 is limbo and non-limbo, 2 is limbo-only, 3 is non-limbo diff --git a/firebase-firestore/src/test/java/com/google/firebase/firestore/remote/RemoteSerializerTest.java b/firebase-firestore/src/test/java/com/google/firebase/firestore/remote/RemoteSerializerTest.java index e3282ba10b2..5286c40a015 100644 --- a/firebase-firestore/src/test/java/com/google/firebase/firestore/remote/RemoteSerializerTest.java +++ b/firebase-firestore/src/test/java/com/google/firebase/firestore/remote/RemoteSerializerTest.java @@ -50,7 +50,6 @@ import com.google.firebase.firestore.core.Query; import com.google.firebase.firestore.core.TargetOrPipeline; import com.google.firebase.firestore.local.QueryPurpose; -import com.google.firebase.firestore.local.TargetData; import com.google.firebase.firestore.model.DatabaseId; import com.google.firebase.firestore.model.DocumentKey; import com.google.firebase.firestore.model.FieldPath; @@ -517,35 +516,38 @@ private Order defaultKeyOrder() { @Test public void testEncodesListenRequestLabels() { Query query = query("collection/key"); - TargetData targetData = - new TargetData( - new TargetOrPipeline.TargetWrapper(query.toTarget()), 2, 3, QueryPurpose.LISTEN); + RemoteTargetData targetData = + new RemoteTargetData( + new TargetOrPipeline.TargetWrapper(query.toTarget()), + RemoteTargetId.from(2), + 3, + QueryPurpose.LISTEN); Map result = serializer.encodeListenRequestLabels(targetData); assertNull(result); targetData = - new TargetData( + new RemoteTargetData( new TargetOrPipeline.TargetWrapper(query.toTarget()), - 2, + RemoteTargetId.from(2), 3, QueryPurpose.LIMBO_RESOLUTION); result = serializer.encodeListenRequestLabels(targetData); assertEquals(map("goog-listen-tags", "limbo-document"), result); targetData = - new TargetData( + new RemoteTargetData( new TargetOrPipeline.TargetWrapper(query.toTarget()), - 2, + RemoteTargetId.from(2), 3, QueryPurpose.EXISTENCE_FILTER_MISMATCH); result = serializer.encodeListenRequestLabels(targetData); assertEquals(map("goog-listen-tags", "existence-filter-mismatch"), result); targetData = - new TargetData( + new RemoteTargetData( new TargetOrPipeline.TargetWrapper(query.toTarget()), - 2, + RemoteTargetId.from(2), 3, QueryPurpose.EXISTENCE_FILTER_MISMATCH_BLOOM); result = serializer.encodeListenRequestLabels(targetData); @@ -557,8 +559,11 @@ public void testEncodesFirstLevelKeyQueries() { Query q = Query.atPath(ResourcePath.fromString("docs/1")); Target actual = serializer.encodeTarget( - new TargetData( - new TargetOrPipeline.TargetWrapper(q.toTarget()), 1, 2, QueryPurpose.LISTEN)); + new RemoteTargetData( + new TargetOrPipeline.TargetWrapper(q.toTarget()), + RemoteTargetId.from(1), + 2, + QueryPurpose.LISTEN)); DocumentsTarget.Builder docs = DocumentsTarget.newBuilder().addDocuments("projects/p/databases/d/documents/docs/1"); @@ -1141,10 +1146,10 @@ public void testEncodesBounds() { @Test public void testEncodesResumeTokens() { Query q = Query.atPath(ResourcePath.fromString("docs")); - TargetData targetData = - new TargetData( + RemoteTargetData targetData = + new RemoteTargetData( new com.google.firebase.firestore.core.TargetOrPipeline.TargetWrapper(q.toTarget()), - 1, + RemoteTargetId.from(1), 2, QueryPurpose.LISTEN) .withResumeToken(TestUtil.resumeToken(1000), SnapshotVersion.NONE); @@ -1174,10 +1179,10 @@ public void testEncodesResumeTokens() { @Test public void testEncodesReadTime() { Query q = Query.atPath(ResourcePath.fromString("docs")); - TargetData targetData = - new TargetData( + RemoteTargetData targetData = + new RemoteTargetData( new com.google.firebase.firestore.core.TargetOrPipeline.TargetWrapper(q.toTarget()), - 1, + RemoteTargetId.from(1), 2, QueryPurpose.LISTEN) .withResumeToken(ByteString.EMPTY, version(4000000)); @@ -1207,10 +1212,10 @@ public void testEncodesReadTime() { @Test public void encodesExpectedCountWhenResumeTokenIsPresent() { Query q = Query.atPath(ResourcePath.fromString("docs")); - TargetData targetData = - new TargetData( + RemoteTargetData targetData = + new RemoteTargetData( new com.google.firebase.firestore.core.TargetOrPipeline.TargetWrapper(q.toTarget()), - 1, + RemoteTargetId.from(1), 2, QueryPurpose.LISTEN) .withResumeToken(TestUtil.resumeToken(1000), SnapshotVersion.NONE) @@ -1242,10 +1247,10 @@ public void encodesExpectedCountWhenResumeTokenIsPresent() { @Test public void encodesExpectedCountWhenReadTimeIsPresent() { Query q = Query.atPath(ResourcePath.fromString("docs")); - TargetData targetData = - new TargetData( + RemoteTargetData targetData = + new RemoteTargetData( new com.google.firebase.firestore.core.TargetOrPipeline.TargetWrapper(q.toTarget()), - 1, + RemoteTargetId.from(1), 2, QueryPurpose.LISTEN) .withResumeToken(ByteString.EMPTY, version(4000000)) @@ -1277,10 +1282,10 @@ public void encodesExpectedCountWhenReadTimeIsPresent() { @Test public void shouldIgnoreExpectedCountWithoutResumeTokenOrReadTime() { Query q = Query.atPath(ResourcePath.fromString("docs")); - TargetData targetData = - new TargetData( + RemoteTargetData targetData = + new RemoteTargetData( new com.google.firebase.firestore.core.TargetOrPipeline.TargetWrapper(q.toTarget()), - 1, + RemoteTargetId.from(1), 2, QueryPurpose.LISTEN) .withExpectedCount(42); @@ -1311,10 +1316,10 @@ public void shouldIgnoreExpectedCountWithoutResumeTokenOrReadTime() { * Wraps the given query in TargetData. This is useful because the APIs we're testing accept * TargetData, but for the most part we're just testing variations on Query. */ - private static TargetData wrapTargetData(Query query) { - return new TargetData( + private static RemoteTargetData wrapTargetData(Query query) { + return new RemoteTargetData( new com.google.firebase.firestore.core.TargetOrPipeline.TargetWrapper(query.toTarget()), - 1, + RemoteTargetId.from(1), 2, QueryPurpose.LISTEN); } diff --git a/firebase-firestore/src/test/java/com/google/firebase/firestore/spec/SpecTestCase.java b/firebase-firestore/src/test/java/com/google/firebase/firestore/spec/SpecTestCase.java index eca5203e452..2fcbc5eb0e5 100644 --- a/firebase-firestore/src/test/java/com/google/firebase/firestore/spec/SpecTestCase.java +++ b/firebase-firestore/src/test/java/com/google/firebase/firestore/spec/SpecTestCase.java @@ -82,6 +82,7 @@ import com.google.firebase.firestore.remote.RemoteSerializer; import com.google.firebase.firestore.remote.RemoteStore; import com.google.firebase.firestore.remote.RemoteStore.RemoteStoreCallback; +import com.google.firebase.firestore.remote.RemoteTargetData; import com.google.firebase.firestore.remote.RemoteTargetId; import com.google.firebase.firestore.remote.WatchChange; import com.google.firebase.firestore.remote.WatchChange.DocumentChange; @@ -1420,11 +1421,11 @@ private void validateActiveTargets() { // Create a copy and map remote target IDs to SDK target IDs Map actualTargets = new HashMap<>(); - for (Map.Entry entry : datastore.activeTargets().entrySet()) { + for (Map.Entry entry : datastore.activeTargets().entrySet()) { int remoteTargetId = entry.getKey(); Integer sdkTargetId = remoteStore.getSdkTargetId(RemoteTargetId.from(remoteTargetId)); if (sdkTargetId != null) { - TargetData remoteTargetData = entry.getValue(); + RemoteTargetData remoteTargetData = entry.getValue(); TargetData sdkTargetData = new TargetData( remoteTargetData.getTarget(), diff --git a/firebase-firestore/src/testUtil/java/com/google/firebase/firestore/testutil/TestTargetMetadataProvider.java b/firebase-firestore/src/testUtil/java/com/google/firebase/firestore/testutil/TestTargetMetadataProvider.java index ef28c87dbad..8bc407a5a11 100644 --- a/firebase-firestore/src/testUtil/java/com/google/firebase/firestore/testutil/TestTargetMetadataProvider.java +++ b/firebase-firestore/src/testUtil/java/com/google/firebase/firestore/testutil/TestTargetMetadataProvider.java @@ -15,8 +15,8 @@ package com.google.firebase.firestore.testutil; import com.google.firebase.database.collection.ImmutableSortedSet; -import com.google.firebase.firestore.local.TargetData; import com.google.firebase.firestore.model.DocumentKey; +import com.google.firebase.firestore.remote.RemoteTargetData; import com.google.firebase.firestore.remote.RemoteTargetId; import com.google.firebase.firestore.remote.WatchChangeAggregator; import java.util.HashMap; @@ -29,7 +29,7 @@ */ public class TestTargetMetadataProvider implements WatchChangeAggregator.TargetMetadataProvider { final Map> syncedKeys = new HashMap<>(); - final Map queryData = new HashMap<>(); + final Map queryData = new HashMap<>(); @Override public ImmutableSortedSet getRemoteKeysForTarget(RemoteTargetId remoteTargetId) { @@ -39,7 +39,7 @@ public ImmutableSortedSet getRemoteKeysForTarget(RemoteTargetId rem @androidx.annotation.Nullable @Override - public TargetData getTargetDataForTarget(RemoteTargetId remoteTargetId) { + public RemoteTargetData getTargetDataForTarget(RemoteTargetId remoteTargetId) { int targetId = remoteTargetId.value(); return queryData.get(targetId); } @@ -50,8 +50,8 @@ public int getSdkTargetId(RemoteTargetId remoteTargetId) { } /** Sets or replaces the local state for the provided query data. */ - public void setSyncedKeys(TargetData targetData, ImmutableSortedSet keys) { - this.queryData.put(targetData.getTargetId(), targetData); - this.syncedKeys.put(targetData.getTargetId(), keys); + public void setSyncedKeys(RemoteTargetData targetData, ImmutableSortedSet keys) { + this.queryData.put(targetData.getTargetId().value(), targetData); + this.syncedKeys.put(targetData.getTargetId().value(), keys); } } diff --git a/firebase-firestore/src/testUtil/java/com/google/firebase/firestore/testutil/TestUtil.java b/firebase-firestore/src/testUtil/java/com/google/firebase/firestore/testutil/TestUtil.java index c5d2099c487..bcd1ba89a77 100644 --- a/firebase-firestore/src/testUtil/java/com/google/firebase/firestore/testutil/TestUtil.java +++ b/firebase-firestore/src/testUtil/java/com/google/firebase/firestore/testutil/TestUtil.java @@ -76,6 +76,7 @@ import com.google.firebase.firestore.model.mutation.VerifyMutation; import com.google.firebase.firestore.remote.ExistenceFilter; import com.google.firebase.firestore.remote.RemoteEvent; +import com.google.firebase.firestore.remote.RemoteTargetData; import com.google.firebase.firestore.remote.RemoteTargetId; import com.google.firebase.firestore.remote.TargetChange; import com.google.firebase.firestore.remote.WatchChange; @@ -404,14 +405,14 @@ public static TargetChange ackTarget(MutableDocument... docs) { return targetChange(ByteString.EMPTY, true, Arrays.asList(docs), null, null); } - public static Map activeQueries(Iterable targets) { + public static Map activeQueries(Iterable targets) { Query query = query("foo"); - Map listenMap = new HashMap<>(); + Map listenMap = new HashMap<>(); for (Integer targetId : targets) { - TargetData targetData = - new TargetData( + RemoteTargetData targetData = + new RemoteTargetData( new TargetOrPipeline.TargetWrapper(query.toTarget()), - targetId, + RemoteTargetId.from(targetId), ARBITRARY_SEQUENCE_NUMBER, QueryPurpose.LISTEN); listenMap.put(targetId, targetData); @@ -419,19 +420,19 @@ public static Map activeQueries(Iterable targets) return listenMap; } - public static Map activeQueries(Integer... targets) { + public static Map activeQueries(Integer... targets) { return activeQueries(asList(targets)); } - public static Map activeLimboQueries( + public static Map activeLimboQueries( String docKey, Iterable targets) { Query query = query(docKey); - Map listenMap = new HashMap<>(); + Map listenMap = new HashMap<>(); for (Integer targetId : targets) { - TargetData targetData = - new TargetData( + RemoteTargetData targetData = + new RemoteTargetData( new TargetOrPipeline.TargetWrapper(query.toTarget()), - targetId, + RemoteTargetId.from(targetId), ARBITRARY_SEQUENCE_NUMBER, QueryPurpose.LIMBO_RESOLUTION); listenMap.put(targetId, targetData); @@ -439,7 +440,8 @@ public static Map activeLimboQueries( return listenMap; } - public static Map activeLimboQueries(String docKey, Integer... targets) { + public static Map activeLimboQueries( + String docKey, Integer... targets) { return activeLimboQueries(docKey, asList(targets)); } @@ -448,7 +450,12 @@ public static RemoteEvent noChangeEvent(int targetId, int version) { } public static RemoteEvent noChangeEvent(int targetId, int version, ByteString resumeToken) { - TargetData targetData = TestUtil.targetData(targetId, QueryPurpose.LISTEN, "foo/bar"); + RemoteTargetData targetData = + new RemoteTargetData( + new TargetOrPipeline.TargetWrapper(query("foo/bar").toTarget()), + RemoteTargetId.from(targetId), + ARBITRARY_SEQUENCE_NUMBER, + QueryPurpose.LISTEN); TestTargetMetadataProvider testTargetMetadataProvider = new TestTargetMetadataProvider(); testTargetMetadataProvider.setSyncedKeys(targetData, DocumentKey.emptyKeySet()); @@ -469,7 +476,12 @@ public static RemoteEvent addedRemoteEvent( public static RemoteEvent existenceFilterEvent( int targetId, ImmutableSortedSet syncedKeys, int remoteCount, int version) { - TargetData targetData = TestUtil.targetData(targetId, QueryPurpose.LISTEN, "foo"); + RemoteTargetData targetData = + new RemoteTargetData( + new TargetOrPipeline.TargetWrapper(query("foo").toTarget()), + RemoteTargetId.from(targetId), + ARBITRARY_SEQUENCE_NUMBER, + QueryPurpose.LISTEN); TestTargetMetadataProvider testTargetMetadataProvider = new TestTargetMetadataProvider(); testTargetMetadataProvider.setSyncedKeys(targetData, syncedKeys); @@ -500,9 +512,13 @@ public ImmutableSortedSet getRemoteKeysForTarget( } @Override - public TargetData getTargetDataForTarget(RemoteTargetId targetId) { + public RemoteTargetData getTargetDataForTarget(RemoteTargetId targetId) { ResourcePath collectionPath = docs.get(0).getKey().getCollectionPath(); - return targetData(targetId.value(), QueryPurpose.LISTEN, collectionPath.toString()); + return new RemoteTargetData( + new TargetOrPipeline.TargetWrapper(Query.atPath(collectionPath).toTarget()), + targetId, + ARBITRARY_SEQUENCE_NUMBER, + QueryPurpose.LISTEN); } @Override @@ -553,9 +569,14 @@ public ImmutableSortedSet getRemoteKeysForTarget( } @Override - public TargetData getTargetDataForTarget(RemoteTargetId targetId) { + public RemoteTargetData getTargetDataForTarget(RemoteTargetId targetId) { return activeTargets.contains(targetId.value()) - ? targetData(targetId.value(), QueryPurpose.LISTEN, doc.getKey().toString()) + ? new RemoteTargetData( + new TargetOrPipeline.TargetWrapper( + Query.atPath(doc.getKey().getPath()).toTarget()), + targetId, + ARBITRARY_SEQUENCE_NUMBER, + QueryPurpose.LISTEN) : null; } From 39cc41183f0ea87db93c53bf17c70be34e93c5d3 Mon Sep 17 00:00:00 2001 From: Mark Duckworth <1124037+MarkDuckworth@users.noreply.github.com> Date: Tue, 12 May 2026 14:34:22 -0600 Subject: [PATCH 4/7] clean raiseWatchSnapshot --- .../firestore/remote/RemoteStore.java | 51 ------------------- 1 file changed, 51 deletions(-) diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteStore.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteStore.java index 4116ddc8013..c7549eaae77 100644 --- a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteStore.java +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteStore.java @@ -623,57 +623,6 @@ private void raiseWatchSnapshot(SnapshotVersion snapshotVersion) { "Can't raise event for unknown SnapshotVersion"); RemoteEvent remoteEvent = watchChangeAggregator.createRemoteEvent(snapshotVersion); - Map> remoteToSdkIds = new HashMap<>(); - for (Entry entry : targetIdMapSdkToRemote.entrySet()) { - RemoteTargetId remoteTargetId = entry.getValue(); - List sdkIds = remoteToSdkIds.get(remoteTargetId); - if (sdkIds == null) { - sdkIds = new ArrayList<>(); - remoteToSdkIds.put(remoteTargetId, sdkIds); - } - sdkIds.add(entry.getKey()); - } - - Map duplicatedTargetChanges = new HashMap<>(); - for (Entry entry : remoteEvent.getTargetChanges().entrySet()) { - int sdkTargetId = entry.getKey(); - RemoteTargetId remoteTargetId = targetIdMapSdkToRemote.get(sdkTargetId); - if (remoteTargetId != null) { - List sdkIds = remoteToSdkIds.get(remoteTargetId); - if (sdkIds != null) { - for (int mappedSdkId : sdkIds) { - duplicatedTargetChanges.put(mappedSdkId, entry.getValue()); - } - } - } else { - duplicatedTargetChanges.put(sdkTargetId, entry.getValue()); - } - } - - Map duplicatedTargetMismatches = new HashMap<>(); - for (Entry entry : remoteEvent.getTargetMismatches().entrySet()) { - int sdkTargetId = entry.getKey(); - RemoteTargetId remoteTargetId = targetIdMapSdkToRemote.get(sdkTargetId); - if (remoteTargetId != null) { - List sdkIds = remoteToSdkIds.get(remoteTargetId); - if (sdkIds != null) { - for (int mappedSdkId : sdkIds) { - duplicatedTargetMismatches.put(mappedSdkId, entry.getValue()); - } - } - } else { - duplicatedTargetMismatches.put(sdkTargetId, entry.getValue()); - } - } - - remoteEvent = - new RemoteEvent( - remoteEvent.getSnapshotVersion(), - Collections.unmodifiableMap(duplicatedTargetChanges), - Collections.unmodifiableMap(duplicatedTargetMismatches), - remoteEvent.getDocumentUpdates(), - remoteEvent.getResolvedLimboDocuments()); - // Update in-memory resume tokens. LocalStore will update the persistent view of these when // applying the completed RemoteEvent. for (Entry entry : remoteEvent.getTargetChanges().entrySet()) { From c96ccd5cd564c4f1b8cc8b6ac457a65e20b3858f Mon Sep 17 00:00:00 2001 From: Mark Duckworth <1124037+MarkDuckworth@users.noreply.github.com> Date: Tue, 12 May 2026 15:42:09 -0600 Subject: [PATCH 5/7] Make RemoteEvent generic to support different target id types --- .../firebase/firestore/core/SyncEngine.java | 9 +-- .../firebase/firestore/local/LocalStore.java | 3 +- .../firestore/remote/RemoteEvent.java | 14 ++--- .../firestore/remote/RemoteStore.java | 56 +++++++++++++++---- .../remote/WatchChangeAggregator.java | 16 +++--- .../firestore/remote/RemoteEventTest.java | 40 ++++++++----- .../firebase/firestore/testutil/TestUtil.java | 27 +++++++-- 7 files changed, 114 insertions(+), 51 deletions(-) diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/core/SyncEngine.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/core/SyncEngine.java index ee0bc898971..d700bfdb01b 100644 --- a/firebase-firestore/src/main/java/com/google/firebase/firestore/core/SyncEngine.java +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/core/SyncEngine.java @@ -366,7 +366,7 @@ public Task> runAggregateQuery( /** Called by FirestoreClient to notify us of a new remote event. */ @Override - public void handleRemoteEvent(RemoteEvent event) { + public void handleRemoteEvent(RemoteEvent event) { assertCallback("handleRemoteEvent"); // Update `receivedDocument` as appropriate for any limbo targets. @@ -465,8 +465,8 @@ public void handleRejectedListen(int targetId, Status error) { Map documentUpdates = Collections.singletonMap(limboKey, result); Set limboDocuments = Collections.singleton(limboKey); - RemoteEvent event = - new RemoteEvent( + RemoteEvent event = + new RemoteEvent<>( SnapshotVersion.NONE, /* targetChanges= */ Collections.emptyMap(), /* targetMismatches= */ Collections.emptyMap(), @@ -673,7 +673,8 @@ private void removeLimboTarget(DocumentKey key) { * snapshot. */ private void emitNewSnapsAndNotifyLocalStore( - ImmutableSortedMap changes, @Nullable RemoteEvent remoteEvent) { + ImmutableSortedMap changes, + @Nullable RemoteEvent remoteEvent) { List newSnapshots = new ArrayList<>(); List documentChangesInAllViews = new ArrayList<>(); diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/local/LocalStore.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/local/LocalStore.java index 8f5412ac10e..28ec1759702 100644 --- a/firebase-firestore/src/main/java/com/google/firebase/firestore/local/LocalStore.java +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/local/LocalStore.java @@ -413,7 +413,8 @@ public void setSessionsToken(ByteString sessionToken) { * *

LocalDocuments are re-calculated if there are remaining mutations in the queue. */ - public ImmutableSortedMap applyRemoteEvent(RemoteEvent remoteEvent) { + public ImmutableSortedMap applyRemoteEvent( + RemoteEvent remoteEvent) { SnapshotVersion remoteVersion = remoteEvent.getSnapshotVersion(); // TODO: Call queryEngine.handleDocumentChange() appropriately. diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteEvent.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteEvent.java index 443ee13ecea..9431025ee37 100644 --- a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteEvent.java +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteEvent.java @@ -25,17 +25,17 @@ * An event from the RemoteStore. It is split into targetChanges (changes to the state or the set of * documents in our watched targets) and documentUpdates (changes to the actual documents). */ -public final class RemoteEvent { +public final class RemoteEvent { private final SnapshotVersion snapshotVersion; - private final Map targetChanges; - private final Map targetMismatches; + private final Map targetChanges; + private final Map targetMismatches; private final Map documentUpdates; private final Set resolvedLimboDocuments; public RemoteEvent( SnapshotVersion snapshotVersion, - Map targetChanges, - Map targetMismatches, + Map targetChanges, + Map targetMismatches, Map documentUpdates, Set resolvedLimboDocuments) { this.snapshotVersion = snapshotVersion; @@ -51,7 +51,7 @@ public SnapshotVersion getSnapshotVersion() { } /** Returns a map from target to changes to the target. */ - public Map getTargetChanges() { + public Map getTargetChanges() { return targetChanges; } @@ -59,7 +59,7 @@ public Map getTargetChanges() { * Returns a map of targets that is known to be inconsistent, and the purpose for re-listening. * Listens for these targets should be re-established without resume tokens. */ - public Map getTargetMismatches() { + public Map getTargetMismatches() { return targetMismatches; } diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteStore.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteStore.java index c7549eaae77..2b1214d449f 100644 --- a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteStore.java +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/RemoteStore.java @@ -50,8 +50,6 @@ import com.google.protobuf.ByteString; import io.grpc.Status; import java.util.ArrayDeque; -import java.util.ArrayList; -import java.util.Collections; import java.util.Deque; import java.util.HashMap; import java.util.List; @@ -80,7 +78,7 @@ public interface RemoteStoreCallback { * any pending mutation batches that would become visible because of the snapshot version the * remote event contains. */ - void handleRemoteEvent(RemoteEvent remoteEvent); + void handleRemoteEvent(RemoteEvent remoteEvent); /** * Reject the listen for the given targetId. This can be triggered by the backend for any active @@ -621,15 +619,15 @@ private void raiseWatchSnapshot(SnapshotVersion snapshotVersion) { hardAssert( !snapshotVersion.equals(SnapshotVersion.NONE), "Can't raise event for unknown SnapshotVersion"); - RemoteEvent remoteEvent = watchChangeAggregator.createRemoteEvent(snapshotVersion); + RemoteEvent remoteEvent = + watchChangeAggregator.createRemoteEvent(snapshotVersion); // Update in-memory resume tokens. LocalStore will update the persistent view of these when // applying the completed RemoteEvent. - for (Entry entry : remoteEvent.getTargetChanges().entrySet()) { + for (Entry entry : remoteEvent.getTargetChanges().entrySet()) { TargetChange targetChange = entry.getValue(); if (!targetChange.getResumeToken().isEmpty()) { - int sdkTargetId = entry.getKey(); - RemoteTargetId remoteTargetId = targetIdMapSdkToRemote.get(sdkTargetId); + RemoteTargetId remoteTargetId = entry.getKey(); if (remoteTargetId != null) { RemoteTargetData remoteTargetData = this.listenTargets.get(remoteTargetId); // A watched target might have been removed already. @@ -644,9 +642,9 @@ private void raiseWatchSnapshot(SnapshotVersion snapshotVersion) { // Re-establish listens for the targets that have been invalidated by existence filter // mismatches. - for (Map.Entry entry : remoteEvent.getTargetMismatches().entrySet()) { - int sdkTargetId = entry.getKey(); - RemoteTargetId remoteTargetId = targetIdMapSdkToRemote.get(sdkTargetId); + for (Map.Entry entry : + remoteEvent.getTargetMismatches().entrySet()) { + RemoteTargetId remoteTargetId = entry.getKey(); if (remoteTargetId != null) { RemoteTargetData remoteTargetData = this.listenTargets.get(remoteTargetId); // A watched target might have been removed already. @@ -678,7 +676,43 @@ private void raiseWatchSnapshot(SnapshotVersion snapshotVersion) { } // Finally raise remote event - remoteStoreCallback.handleRemoteEvent(remoteEvent); + remoteStoreCallback.handleRemoteEvent(toSdkRemoteEvent(remoteEvent)); + } + + /** + * Convert a RemoteEvent with remote IDs to a RemoteEvent with + * SDK IDs and dropped updates + * for any targets we no longer track. + */ + private RemoteEvent toSdkRemoteEvent(RemoteEvent remoteEvent) { + Map sdkTargetChanges = new HashMap<>(); + for (Map.Entry entry : + remoteEvent.getTargetChanges().entrySet()) { + RemoteTargetId remoteTargetId = entry.getKey(); + TargetChange change = entry.getValue(); + Integer sdkTargetId = targetIdMapRemoteToSdk.get(remoteTargetId); + if (sdkTargetId != null) { + sdkTargetChanges.put(sdkTargetId, change); + } + } + + Map sdkTargetMismatches = new HashMap<>(); + for (Map.Entry entry : + remoteEvent.getTargetMismatches().entrySet()) { + RemoteTargetId remoteTargetId = entry.getKey(); + QueryPurpose purpose = entry.getValue(); + Integer sdkTargetId = targetIdMapRemoteToSdk.get(remoteTargetId); + if (sdkTargetId != null) { + sdkTargetMismatches.put(sdkTargetId, purpose); + } + } + + return new RemoteEvent<>( + remoteEvent.getSnapshotVersion(), + sdkTargetChanges, + sdkTargetMismatches, + remoteEvent.getDocumentUpdates(), + remoteEvent.getResolvedLimboDocuments()); } private void processTargetError(WatchTargetChange targetChange) { diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/WatchChangeAggregator.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/WatchChangeAggregator.java index 2c9b9fe7630..30ab710645f 100644 --- a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/WatchChangeAggregator.java +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/WatchChangeAggregator.java @@ -326,8 +326,8 @@ private int filterRemovedDocuments(BloomFilter bloomFilter, RemoteTargetId targe * Converts the currently accumulated state into a remote event at the provided snapshot version. * Resets the accumulated changes before returning. */ - public RemoteEvent createRemoteEvent(SnapshotVersion snapshotVersion) { - Map targetChanges = new HashMap<>(); + public RemoteEvent createRemoteEvent(SnapshotVersion snapshotVersion) { + Map targetChanges = new HashMap<>(); for (Map.Entry entry : targetStates.entrySet()) { RemoteTargetId targetId = entry.getKey(); @@ -349,8 +349,7 @@ public RemoteEvent createRemoteEvent(SnapshotVersion snapshotVersion) { } if (targetState.hasChanges()) { - int sdkTargetId = targetMetadataProvider.getSdkTargetId(targetId); - targetChanges.put(sdkTargetId, targetState.toTargetChange()); + targetChanges.put(targetId, targetState.toTargetChange()); targetState.clearChanges(); } } @@ -386,14 +385,13 @@ public RemoteEvent createRemoteEvent(SnapshotVersion snapshotVersion) { document.setReadTime(snapshotVersion); } - Map translatedTargetMismatches = new HashMap<>(); + Map translatedTargetMismatches = new HashMap<>(); for (Map.Entry entry : pendingTargetResets.entrySet()) { - int sdkTargetId = targetMetadataProvider.getSdkTargetId(entry.getKey()); - translatedTargetMismatches.put(sdkTargetId, entry.getValue()); + translatedTargetMismatches.put(entry.getKey(), entry.getValue()); } - RemoteEvent remoteEvent = - new RemoteEvent( + RemoteEvent remoteEvent = + new RemoteEvent<>( snapshotVersion, Collections.unmodifiableMap(targetChanges), Collections.unmodifiableMap(translatedTargetMismatches), diff --git a/firebase-firestore/src/test/java/com/google/firebase/firestore/remote/RemoteEventTest.java b/firebase-firestore/src/test/java/com/google/firebase/firestore/remote/RemoteEventTest.java index 3d1dba67a20..7092a2199f1 100644 --- a/firebase-firestore/src/test/java/com/google/firebase/firestore/remote/RemoteEventTest.java +++ b/firebase-firestore/src/test/java/com/google/firebase/firestore/remote/RemoteEventTest.java @@ -39,6 +39,7 @@ import com.google.firebase.firestore.remote.WatchChange.WatchTargetChange; import com.google.firebase.firestore.remote.WatchChange.WatchTargetChangeType; import com.google.firebase.firestore.testutil.TestTargetMetadataProvider; +import com.google.firebase.firestore.testutil.TestUtil; import com.google.firestore.v1.BitSequence; import com.google.firestore.v1.BloomFilter; import com.google.protobuf.ByteString; @@ -104,7 +105,7 @@ private WatchChangeAggregator createAggregator( for (Map.Entry entry : outstandingResponses.entrySet()) { for (int i = 0; i < entry.getValue(); ++i) { - aggregator.recordPendingTargetRequest(entry.getKey()); + aggregator.recordPendingTargetRequest(RemoteTargetId.from(entry.getKey())); } } @@ -146,7 +147,7 @@ private RemoteEvent createRemoteEvent( WatchChange... watchChanges) { WatchChangeAggregator aggregator = createAggregator(targetMap, outstandingResponses, existingKeys, watchChanges); - return aggregator.createRemoteEvent(version(snapshotVersion)); + return TestUtil.toSdkRemoteEvent(aggregator.createRemoteEvent(version(snapshotVersion))); } @Test @@ -295,7 +296,8 @@ public void testWillHandleSingleReset() { WatchTargetChange change = new WatchTargetChange(WatchTargetChangeType.Reset, asList(1)); aggregator.handleTargetChange(change); - RemoteEvent event = aggregator.createRemoteEvent(version(3)); + RemoteEvent event = + TestUtil.toSdkRemoteEvent(aggregator.createRemoteEvent(version(3))); assertEquals(version(3), event.getSnapshotVersion()); assertEquals(0, event.getDocumentUpdates().size()); @@ -407,7 +409,8 @@ public void testNoChangeWillStillMarkTheAffectedTargets() { WatchTargetChange change = new WatchTargetChange(WatchTargetChangeType.NoChange, asList(1)); aggregator.handleTargetChange(change); - RemoteEvent event = aggregator.createRemoteEvent(version(3)); + RemoteEvent event = + TestUtil.toSdkRemoteEvent(aggregator.createRemoteEvent(version(3))); assertEquals(version(3), event.getSnapshotVersion()); assertEquals(0, event.getDocumentUpdates().size()); assertEquals(1, event.getTargetChanges().size()); @@ -436,7 +439,8 @@ public void testExistenceFilterMismatchClearsTarget() { change2, change3); - RemoteEvent event = aggregator.createRemoteEvent(version(3)); + RemoteEvent event = + TestUtil.toSdkRemoteEvent(aggregator.createRemoteEvent(version(3))); assertEquals(version(3), event.getSnapshotVersion()); assertEquals(2, event.getDocumentUpdates().size()); @@ -455,7 +459,7 @@ public void testExistenceFilterMismatchClearsTarget() { new WatchChange.ExistenceFilterWatchChange(1, new ExistenceFilter(1)); aggregator.handleExistenceFilter(watchChange); - event = aggregator.createRemoteEvent(version(3)); + event = TestUtil.toSdkRemoteEvent(aggregator.createRemoteEvent(version(3))); TargetChange mapping3 = targetChange(ByteString.EMPTY, false, null, null, asList(doc1, doc2)); assertEquals(1, event.getTargetChanges().size()); @@ -484,7 +488,8 @@ public void existenceFilterMismatchWithSuccessfulBloomFilterApplication() { change2, change3); - RemoteEvent event = aggregator.createRemoteEvent(version(3)); + RemoteEvent event = + TestUtil.toSdkRemoteEvent(aggregator.createRemoteEvent(version(3))); assertEquals(version(3), event.getSnapshotVersion()); assertEquals(2, event.getDocumentUpdates().size()); @@ -511,7 +516,7 @@ public void existenceFilterMismatchWithSuccessfulBloomFilterApplication() { new WatchChange.ExistenceFilterWatchChange(1, new ExistenceFilter(1, bloomFilter.build())); aggregator.handleExistenceFilter(watchChange); - event = aggregator.createRemoteEvent(version(3)); + event = TestUtil.toSdkRemoteEvent(aggregator.createRemoteEvent(version(3))); assertEquals(1, event.getTargetChanges().size()); assertEquals(0, event.getTargetMismatches().size()); @@ -538,7 +543,8 @@ public void existenceFilterMismatchWithBloomFilterFalsePositiveResult() { change2, change3); - RemoteEvent event = aggregator.createRemoteEvent(version(3)); + RemoteEvent event = + TestUtil.toSdkRemoteEvent(aggregator.createRemoteEvent(version(3))); assertEquals(version(3), event.getSnapshotVersion()); assertEquals(2, event.getDocumentUpdates().size()); @@ -565,7 +571,7 @@ public void existenceFilterMismatchWithBloomFilterFalsePositiveResult() { new WatchChange.ExistenceFilterWatchChange(1, new ExistenceFilter(1, bloomFilter.build())); aggregator.handleExistenceFilter(watchChange); - event = aggregator.createRemoteEvent(version(3)); + event = TestUtil.toSdkRemoteEvent(aggregator.createRemoteEvent(version(3))); TargetChange mapping3 = targetChange(ByteString.EMPTY, false, null, null, asList(doc1, doc2)); assertEquals(1, event.getTargetChanges().size()); @@ -593,7 +599,8 @@ public void testExistenceFilterMismatchRemovesCurrentChanges() { new WatchChange.ExistenceFilterWatchChange(1, new ExistenceFilter(0)); aggregator.handleExistenceFilter(existenceFilter); - RemoteEvent event = aggregator.createRemoteEvent(version(3)); + RemoteEvent event = + TestUtil.toSdkRemoteEvent(aggregator.createRemoteEvent(version(3))); assertEquals(version(3), event.getSnapshotVersion()); assertEquals(1, event.getDocumentUpdates().size()); @@ -618,7 +625,8 @@ public void testDocumentUpdate() { WatchChangeAggregator aggregator = createAggregator(targetMap, noOutstandingResponses, noExistingKeys, change1, change2); - RemoteEvent event = aggregator.createRemoteEvent(version(3)); + RemoteEvent event = + TestUtil.toSdkRemoteEvent(aggregator.createRemoteEvent(version(3))); assertEquals(version(3), event.getSnapshotVersion()); assertEquals(2, event.getDocumentUpdates().size()); assertEquals(doc1, event.getDocumentUpdates().get(doc1.getKey())); @@ -640,7 +648,7 @@ public void testDocumentUpdate() { DocumentChange change5 = new DocumentChange(asList(1), emptyList(), doc3.getKey(), doc3); aggregator.handleDocumentChange(change5); - event = aggregator.createRemoteEvent(version(3)); + event = TestUtil.toSdkRemoteEvent(aggregator.createRemoteEvent(version(3))); assertEquals(version(3), event.getSnapshotVersion()); assertEquals(3, event.getDocumentUpdates().size()); @@ -674,7 +682,8 @@ public void testResumeTokenHandledPerTarget() { new WatchTargetChange(WatchTargetChangeType.Current, asList(2), resumeToken2); aggregator.handleTargetChange(change2); - RemoteEvent event = aggregator.createRemoteEvent(version(3)); + RemoteEvent event = + TestUtil.toSdkRemoteEvent(aggregator.createRemoteEvent(version(3))); assertEquals(2, event.getTargetChanges().size()); @@ -705,7 +714,8 @@ public void testLastResumeTokenWins() { new WatchTargetChange(WatchTargetChangeType.Current, asList(2), resumeToken3); aggregator.handleTargetChange(change3); - RemoteEvent event = aggregator.createRemoteEvent(version(3)); + RemoteEvent event = + TestUtil.toSdkRemoteEvent(aggregator.createRemoteEvent(version(3))); assertEquals(2, event.getTargetChanges().size()); diff --git a/firebase-firestore/src/testUtil/java/com/google/firebase/firestore/testutil/TestUtil.java b/firebase-firestore/src/testUtil/java/com/google/firebase/firestore/testutil/TestUtil.java index bcd1ba89a77..77e12411fcc 100644 --- a/firebase-firestore/src/testUtil/java/com/google/firebase/firestore/testutil/TestUtil.java +++ b/firebase-firestore/src/testUtil/java/com/google/firebase/firestore/testutil/TestUtil.java @@ -445,6 +445,25 @@ public static Map activeLimboQueries( return activeLimboQueries(docKey, asList(targets)); } + public static RemoteEvent toSdkRemoteEvent(RemoteEvent remoteEvent) { + Map targetChanges = new HashMap<>(); + for (Map.Entry entry : + remoteEvent.getTargetChanges().entrySet()) { + targetChanges.put(entry.getKey().value(), entry.getValue()); + } + Map targetMismatches = new HashMap<>(); + for (Map.Entry entry : + remoteEvent.getTargetMismatches().entrySet()) { + targetMismatches.put(entry.getKey().value(), entry.getValue()); + } + return new RemoteEvent<>( + remoteEvent.getSnapshotVersion(), + targetChanges, + targetMismatches, + remoteEvent.getDocumentUpdates(), + remoteEvent.getResolvedLimboDocuments()); + } + public static RemoteEvent noChangeEvent(int targetId, int version) { return noChangeEvent(targetId, version, resumeToken(version)); } @@ -466,7 +485,7 @@ public static RemoteEvent noChangeEvent(int targetId, int version, ByteString re new WatchChange.WatchTargetChange( WatchChange.WatchTargetChangeType.NoChange, asList(targetId), resumeToken); aggregator.handleTargetChange(watchChange); - return aggregator.createRemoteEvent(version(version)); + return toSdkRemoteEvent(aggregator.createRemoteEvent(version(version))); } public static RemoteEvent addedRemoteEvent( @@ -492,7 +511,7 @@ public static RemoteEvent existenceFilterEvent( WatchChange.ExistenceFilterWatchChange existenceFilterWatchChange = new WatchChange.ExistenceFilterWatchChange(targetId, existenceFilter); aggregator.handleExistenceFilter(existenceFilterWatchChange); - return aggregator.createRemoteEvent(version(version)); + return toSdkRemoteEvent(aggregator.createRemoteEvent(version(version))); } public static RemoteEvent addedRemoteEvent( @@ -536,7 +555,7 @@ public int getSdkTargetId(RemoteTargetId remoteTargetId) { version = doc.getVersion().compareTo(version) > 0 ? doc.getVersion() : version; } - return aggregator.createRemoteEvent(version); + return toSdkRemoteEvent(aggregator.createRemoteEvent(version)); } public static RemoteEvent addedRemoteEvent(MutableDocument doc, Integer targetId) { @@ -586,7 +605,7 @@ public int getSdkTargetId(RemoteTargetId remoteTargetId) { } }); aggregator.handleDocumentChange(change); - return aggregator.createRemoteEvent(doc.getVersion()); + return toSdkRemoteEvent(aggregator.createRemoteEvent(doc.getVersion())); } public static SetMutation setMutation(String path, Map values) { From 495aee6c491d7a76fe056378e8683e4fafc558bf Mon Sep 17 00:00:00 2001 From: Mark Duckworth <1124037+MarkDuckworth@users.noreply.github.com> Date: Tue, 12 May 2026 16:38:40 -0600 Subject: [PATCH 6/7] reverting unnecessary mapping --- .../firebase/firestore/remote/WatchChangeAggregator.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/WatchChangeAggregator.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/WatchChangeAggregator.java index 30ab710645f..1d856df8a10 100644 --- a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/WatchChangeAggregator.java +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/WatchChangeAggregator.java @@ -385,16 +385,11 @@ public RemoteEvent createRemoteEvent(SnapshotVersion snapshotVer document.setReadTime(snapshotVersion); } - Map translatedTargetMismatches = new HashMap<>(); - for (Map.Entry entry : pendingTargetResets.entrySet()) { - translatedTargetMismatches.put(entry.getKey(), entry.getValue()); - } - RemoteEvent remoteEvent = new RemoteEvent<>( snapshotVersion, Collections.unmodifiableMap(targetChanges), - Collections.unmodifiableMap(translatedTargetMismatches), + Collections.unmodifiableMap(pendingTargetResets), Collections.unmodifiableMap(pendingDocumentUpdates), Collections.unmodifiableSet(resolvedLimboDocuments)); From 8ec6d68adf295f3b4c758ecdef9501d721914375 Mon Sep 17 00:00:00 2001 From: Mark Duckworth <1124037+MarkDuckworth@users.noreply.github.com> Date: Wed, 13 May 2026 15:22:28 -0600 Subject: [PATCH 7/7] Update spec test runner to match js --- .../firebase/firestore/spec/SpecTestCase.java | 125 ++++++++---------- 1 file changed, 58 insertions(+), 67 deletions(-) diff --git a/firebase-firestore/src/test/java/com/google/firebase/firestore/spec/SpecTestCase.java b/firebase-firestore/src/test/java/com/google/firebase/firestore/spec/SpecTestCase.java index 2fcbc5eb0e5..6d33f9be7f3 100644 --- a/firebase-firestore/src/test/java/com/google/firebase/firestore/spec/SpecTestCase.java +++ b/firebase-firestore/src/test/java/com/google/firebase/firestore/spec/SpecTestCase.java @@ -1080,11 +1080,13 @@ private void doWatchUsesTargetIndex(Object value) throws Exception { } } - private int getRemoteTargetId(int sdkTargetId) { + private int getRemoteTargetId(int sdkTargetId, boolean isWatchStep) { List actualIds = sdkTargetIdMapExpectedToActual.get(sdkTargetId); int actualId = sdkTargetId; if (actualIds != null && !actualIds.isEmpty()) { - if (currentRemoteTargetIndex != null && currentRemoteTargetIndex < actualIds.size()) { + if (isWatchStep + && currentRemoteTargetIndex != null + && currentRemoteTargetIndex < actualIds.size()) { actualId = actualIds.get(currentRemoteTargetIndex); } else { actualId = actualIds.get(actualIds.size() - 1); @@ -1101,7 +1103,7 @@ private int getRemoteTargetId(int sdkTargetId) { remoteIds.add(remoteTargetId.value()); } - if (currentRemoteTargetIndex != null) { + if (isWatchStep && currentRemoteTargetIndex != null) { assertTrue( "Index " + currentRemoteTargetIndex @@ -1120,6 +1122,10 @@ private int getRemoteTargetId(int sdkTargetId) { return remoteIds.get(remoteIds.size() - 1); } + private int getRemoteTargetId(int sdkTargetId) { + return getRemoteTargetId(sdkTargetId, true); + } + // // Methods for validating expectations. // @@ -1419,26 +1425,8 @@ private void validateActiveTargets() { return; } - // Create a copy and map remote target IDs to SDK target IDs - Map actualTargets = new HashMap<>(); - for (Map.Entry entry : datastore.activeTargets().entrySet()) { - int remoteTargetId = entry.getKey(); - Integer sdkTargetId = remoteStore.getSdkTargetId(RemoteTargetId.from(remoteTargetId)); - if (sdkTargetId != null) { - RemoteTargetData remoteTargetData = entry.getValue(); - TargetData sdkTargetData = - new TargetData( - remoteTargetData.getTarget(), - sdkTargetId, - remoteTargetData.getSequenceNumber(), - remoteTargetData.getPurpose(), - remoteTargetData.getSnapshotVersion(), - remoteTargetData.getLastLimboFreeSnapshotVersion(), - remoteTargetData.getResumeToken(), - remoteTargetData.getExpectedCount()); - actualTargets.put(sdkTargetId, sdkTargetData); - } - } + // Create a copy of the actual targets from the datastore, keyed by remote target ID. + Map actualTargets = new HashMap<>(datastore.activeTargets()); for (Map.Entry> expected : expectedActiveTargets.entrySet()) { int expectedId = expected.getKey(); @@ -1448,55 +1436,58 @@ private void validateActiveTargets() { } for (int actualId : actualIds) { - if (actualTargets.containsKey(actualId)) { - List expectedQueries = expected.getValue(); - TargetData expectedTarget = expectedQueries.get(0); - TargetData actualTarget = actualTargets.get(actualId); - - // TODO: Replace the assertEquals() checks on the individual properties of TargetData - // below - // with the single assertEquals on the TargetData objects themselves if the sequenceNumber - // is - // ever made to be consistent. - // assertEquals(expectedTarget, actualTarget); - assertEquals(expectedTarget.getPurpose(), actualTarget.getPurpose()); - if (usePipelineMode - && !expectedTarget.getPurpose().equals(QueryPurpose.LIMBO_RESOLUTION)) { - boolean matched = false; - for (TargetData expTarget : expectedQueries) { - if (expTarget.getTarget().equals(actualTarget.getTarget())) { - matched = true; - break; - } + int remoteId = getRemoteTargetId(actualId, false); + assertTrue( + "Expected active target not found: " + expected.getValue(), + actualTargets.containsKey(remoteId)); + + List expectedQueries = expected.getValue(); + TargetData expectedTarget = expectedQueries.get(0); + RemoteTargetData actualTarget = actualTargets.get(remoteId); + + // TODO: Replace the assertEquals() checks on the individual properties of TargetData + // below + // with the single assertEquals on the TargetData objects themselves if the sequenceNumber + // is + // ever made to be consistent. + // assertEquals(expectedTarget, actualTarget); + assertEquals(expectedTarget.getPurpose(), actualTarget.getPurpose()); + if (usePipelineMode && !expectedTarget.getPurpose().equals(QueryPurpose.LIMBO_RESOLUTION)) { + boolean matched = false; + for (TargetData expTarget : expectedQueries) { + if (expTarget.getTarget().equals(actualTarget.getTarget())) { + matched = true; + break; } - assertTrue( - "Expected pipeline " - + actualTarget.getTarget() - + " not found in expected active list: " - + expectedQueries, - matched); - } else { - assertEquals(expectedTarget.getTarget(), actualTarget.getTarget()); - } - int expectedTargetId = expectedTarget.getTargetId(); - List expActualIds = sdkTargetIdMapExpectedToActual.get(expectedTargetId); - if (expActualIds == null) { - expActualIds = Collections.singletonList(expectedTargetId); } assertTrue( - "Expected target ID mapping not found for " + expectedTargetId, - expActualIds.contains(actualTarget.getTargetId())); - assertEquals(expectedTarget.getSnapshotVersion(), actualTarget.getSnapshotVersion()); - assertEquals( - expectedTarget.getResumeToken().toStringUtf8(), - actualTarget.getResumeToken().toStringUtf8()); - - if (expectedTarget.getExpectedCount() != null) { - assertEquals(expectedTarget.getExpectedCount(), actualTarget.getExpectedCount()); - } + "Expected pipeline " + + actualTarget.getTarget() + + " not found in expected active list: " + + expectedQueries, + matched); + } else { + assertEquals(expectedTarget.getTarget(), actualTarget.getTarget()); + } + int expectedTargetId = expectedTarget.getTargetId(); + List expActualIds = sdkTargetIdMapExpectedToActual.get(expectedTargetId); + if (expActualIds == null) { + expActualIds = Collections.singletonList(expectedTargetId); + } + Integer actualTargetId = remoteStore.getSdkTargetId(actualTarget.getTargetId()); + assertTrue( + "Expected target ID mapping not found for " + expectedTargetId, + actualTargetId != null && expActualIds.contains(actualTargetId)); + assertEquals(expectedTarget.getSnapshotVersion(), actualTarget.getSnapshotVersion()); + assertEquals( + expectedTarget.getResumeToken().toStringUtf8(), + actualTarget.getResumeToken().toStringUtf8()); - actualTargets.remove(actualId); + if (expectedTarget.getExpectedCount() != null) { + assertEquals(expectedTarget.getExpectedCount(), actualTarget.getExpectedCount()); } + + actualTargets.remove(remoteId); } }