Implement LogicalClockFixture

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • 3.5.7
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • Sharding 2017-05-08
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Set up a mocked-up objects for testing replica-set causal consistent reads.
      The fixture should provide the following functionality:

      • set LogicalClock
      • write to an opLog
      • read from an opLog
      • write to secondary and primary nodes (separately by setting repl coordinator mode)
      • read from the secondary and primary nodes
      • clocksource skew
      • disable/enable readConcernMajority

      Implementation:

      • Use existing LogicalClockTest class can be used as a base, inherit from ShardingMongodTestFixture
      • override setUp to
        a) set up logicalClock on serviceContext
        b) add a clockSource mock
        c) add a keyManager mock
      • Integrate functionality from logical_clock_test.cpp and reuse the new fixture there.
      • Add one test that causes a write to opLog and check that the result matches the current clusterTime - may be using get lastAppliedOptime() method of replicationCoordinator

            Assignee:
            Jack Mulrow
            Reporter:
            Misha Tyulenev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: