couchbase-lite-core icon indicating copy to clipboard operation
couchbase-lite-core copied to clipboard

CBL-3774: Collection SG test, "Auto Purge Enabled - Revoke Access"

Open callumbirks opened this issue 3 years ago • 5 comments

Port test. Several adjustments made to fit into this test suite.

callumbirks avatar Oct 18 '22 17:10 callumbirks

Looks like I accidentally included a change in the comments at the top of the file, this change is also present though in the ongoing PR CBL-3794.

callumbirks avatar Oct 18 '22 17:10 callumbirks

Code Coverage Results:

Type Percentage
functions 79.68
instantiations 33.52
lines 79.66
regions 75.32

cbl-bot avatar Oct 18 '22 17:10 cbl-bot

PR Validation Fail. Please make sure that PR Validation are all passed before submitting for review.

pasin avatar Oct 19 '22 04:10 pasin

@jianminzhao What is the latest strategy (e.g. using channels or docIDs filters) for setting up the replicator in tests with SG?

pasin avatar Oct 19 '22 04:10 pasin

This test is not included in PR validation. The validation failure must be due to something else, a.k.a flaky test.

jianminzhao avatar Oct 19 '22 16:10 jianminzhao

This test is not included in PR validation. The validation failure must be due to something else, a.k.a flaky test.

I think it failed during the jenkins Windows or MacOS build because of an unused variable or something.

callumbirks avatar Oct 20 '22 10:10 callumbirks

Test is now passing multiple times in a row without purging bucket or restarting SGW. Achieved this by purging doc at the end of test. Also now have temp user for test, as Pasin suggested. Test is now also future-proofed against the multiple-collection support in SGW as I have specified the document's collection in the PUT request.

callumbirks avatar Oct 21 '22 12:10 callumbirks

Tests are passing, turns out it was due to some strange SGW bug. Possibly related to CBG-2487.

callumbirks avatar Nov 03 '22 11:11 callumbirks

I've had to modify the assignUserChannel function to take a parameter of user because it was hardcoded "sguser"

callumbirks avatar Nov 03 '22 17:11 callumbirks

I've temporarily set the test's tag to "SyncServerCollectionTEMP" until we decide what to do with the test while CBG-2487 is still causing flaky failures.

callumbirks avatar Nov 17 '22 13:11 callumbirks