Skip to content

Commit 34524ac

Browse files
authored
Update test_filter_removed_access_documents for JS (#307)
* Update test_filter_removed_access_documents for JS Not checking for the filtered access removed doc notification for JS. Based on the discussion, we will not implement document ended notification for the docs rejected by the pull filter in JS. We may implement it based on demand. From Jens, this feature doesn’t make sense as the rejection from the user’s replication filters shouldn’t be treat as an error. Also it happens on the platform as a side effect due to an error thrown by LiteCore. I have created CBL-7645 for changing the behavior on the other platforms in the future release. * Update per feedback
1 parent 3a3cf0e commit 34524ac

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

spec/tests/dev_e2e/003-replication-auto-purge.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,10 @@ Test that when the removed access documents are filtered, the removed access doc
182182
* credentials: user1/pass
183183
8. Check document replications:
184184
* `post_1` has access-removed flag set with no error.
185-
* `post_2` has access-removed flag set with WebSocket/403 ("CBL, 10403) error.
185+
* Note: JS doesn't notify document ended error notifications when documents
186+
are rejected by pull replication filters. The other platforms plan to align
187+
this behavior. So we are not checking the error from the filtered removed
188+
revision here. See CBL-7246 and CBL-7645 for more details.
186189
9. Check local documents:
187190
* `post_1` was purged.
188191
* `post_2` still exists.

tests/dev_e2e/test_replication_auto_purge.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,10 @@ async def test_filter_removed_access_documents(
732732
self.mark_test_step("""
733733
Check document replications
734734
* `post_1` has access-removed flag set with no error.
735-
* `post_2` has access-removed flag set with WebSocket/403 ("CBL, 10403) error.
735+
* Note: JS doesn't notify document ended error notifications when documents
736+
are rejected by pull replication filters. The other platforms plan to align
737+
this behavior. So we are not checking the error from the filtered removed
738+
revision here. See CBL-7246 and CBL-7645 for more details.
736739
""")
737740
await repl2.wait_for_all_doc_events(
738741
{
@@ -741,15 +744,7 @@ async def test_filter_removed_access_documents(
741744
"post_1",
742745
ReplicatorType.PULL,
743746
ReplicatorDocumentFlags.ACCESS_REMOVED,
744-
),
745-
WaitForDocumentEventEntry(
746-
"_default.posts",
747-
"post_2",
748-
ReplicatorType.PULL,
749-
ReplicatorDocumentFlags.ACCESS_REMOVED,
750-
"CBL",
751-
10403,
752-
),
747+
)
753748
}
754749
)
755750

0 commit comments

Comments
 (0)