Database GetDocumentExpiration returns null instead of expected date

Description

LiteCore API Native.c4doc_getExpiration(_c4db, docId, &err2); did not return the expected long value (represent date time) instead it returns 0.

 

After update to LiteCore to
CE: f375a7fbbce062b7f3058a5c42de1befe8ee7dba
.Net test:

public void TestGetExpirationFromDeletedDoc()
        {
            DateTimeOffset dto3 = DateTimeOffset.UtcNow.AddSeconds(3);
            using (var doc1a = new MutableDocument("deleted_doc"))

{                 doc1a.SetInt("answer", 12);                 doc1a.SetValue("options", new[]
{ 1, 2, 3 }

);
                Db.Save(doc1a);
                Db.SetDocumentExpiration("deleted_doc", dto3).Should().Be(true);
                Db.Delete(doc1a);  
            }
            var exp = Db.GetDocumentExpiration("deleted_doc");
            exp.Should().BeSameDateAs(dto3); <-- failed exp is null value instead of expected date time value.
        }

Activity

Show:

CB robot February 4, 2022 at 8:49 PM

Build couchbase-lite-java-3.1.0-121 contains couchbase-lite-java-ee-root commit b190c0c with commit message:
Verify resolutions for and

CB robot February 4, 2022 at 8:49 PM

Build couchbase-lite-java-3.1.0-121 contains couchbase-lite-java-common commit 638f8ca with commit message:
Verify resolutions for and

CB robot February 4, 2022 at 8:48 PM

Build couchbase-lite-android-3.1.0-123 contains couchbase-lite-java-ee-root commit b190c0c with commit message:
Verify resolutions for and

CB robot February 4, 2022 at 8:48 PM

Build couchbase-lite-android-3.1.0-123 contains couchbase-lite-java-common commit 638f8ca with commit message:
Verify resolutions for and

Blake Meike January 20, 2022 at 9:03 PM

The failure mode for testCrossJoin (also failing on other platforms) is somewhat different. Here is the log of the failure:

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created January 13, 2022 at 9:30 PM
Updated February 4, 2022 at 9:14 PM
Resolved February 4, 2022 at 9:14 PM
Instabug