MCPcopy Create free account
hub / github.com/facebook/time / TestRunLinearizabilityTestsNoGMs

Function TestRunLinearizabilityTestsNoGMs

fbclock/daemon/daemon_test.go:699–710  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

697 got, err = fbclock.ReadFBClockDataV1(shmpData)
698 require.NoError(t, err)
699 require.Equal(t, want.IngressTimeNS, got.IngressTimeNS)
700 require.Equal(t, want.ErrorBoundNS, got.ErrorBoundNS)
701 require.InDelta(t, want.HoldoverMultiplierNS, got.HoldoverMultiplierNS, 0.001)
702}
703
704func TestLeapSecondSmearing(t *testing.T) {
705 // assume that these were the 2 most recent leap seconds in tzinfo data
706 leaps := []leapsectz.LeapSecond{
707 {Tleap: 1435708837, Nleap: 25}, // Wednesday, 1 July 2015 00:00:25 | 25 leap seconds
708 {Tleap: 1483228826, Nleap: 26}, // Sunday, 01 Jan 2017 00:00:26 UTC | 26 leap seconds
709 }
710 got := leapSecondSmearing(leaps)
711 want := &clockSmearing{
712 smearingStartS: 1483228836, // Sun, 01 Jan 2017 00:00:36 TAI (or Sat, 31 Dec 2016 12:00:00 UTC)
713 smearingEndS: 1483291336, // Sun, 01 Jan 2017 17:22:53 TAI (or Sun, 01 Jan 2017 17:22:16 UTC)

Callers

nothing calls this directly

Calls 4

GetMethod · 0.95
newTestDaemonFunction · 0.85
LogMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…