(t *testing.T)
| 53 | } |
| 54 | |
| 55 | func TestDaemonStateLinearizabilityRing(t *testing.T) { |
| 56 | s := newDaemonState(3) |
| 57 | |
| 58 | probes := []linearizability.TestResult{ |
| 59 | linearizability.PTPTestResult{ |
| 60 | Server: "server01", |
| 61 | TXTimestamp: time.Unix(0, 1647359186979431100), |
| 62 | RXTimestamp: time.Unix(0, 1647359186979431635), |
| 63 | }, |
| 64 | linearizability.PTPTestResult{ |
| 65 | Server: "server02", |
| 66 | TXTimestamp: time.Unix(0, 1647359186979431200), |
| 67 | RXTimestamp: time.Unix(0, 1647359186979431735), |
| 68 | }, |
| 69 | linearizability.PTPTestResult{ |
| 70 | Server: "server01", |
| 71 | TXTimestamp: time.Unix(0, 1647359186979431300), |
| 72 | RXTimestamp: time.Unix(0, 1647359186979431835), |
| 73 | }, |
| 74 | } |
| 75 | |
| 76 | for _, tr := range probes { |
| 77 | s.pushLinearizabilityTestResult(tr) |
| 78 | } |
| 79 | got := s.takeLinearizabilityTestResult(3) |
| 80 | require.ElementsMatch(t, probes, got) |
| 81 | } |
| 82 | |
| 83 | func TestDaemonStateAggregateMax(t *testing.T) { |
| 84 | s := newDaemonState(3) |
nothing calls this directly
no test coverage detected
searching dependent graphs…