public static FailEvent createFailEvent(long time, int process) { return createFailEvent(time, process, "unknown"); }
@Test public void shouldIgnoreFailureOnOtherProcess() { long time = 0; Event event1 = TestEventUtils.invokeTimestamp(time++, PROCESS_0); Event event2 = TestEventUtils.createFailEvent(time++, PROCESS_0); Event event3 = TestEventUtils.invokeTimestamp(time++, PROCESS_1); Event event4 = TestEventUtils.timestampOk(time++, PROCESS_1, "1"); CheckerTestUtils.assertNoErrors(NonOverlappingReadsMonotonicChecker::new, event1, event2, event3, event4); }
@Test public void failureShouldNegateInvokeOnOneProcess() { long time = 0; Event event1 = TestEventUtils.invokeTimestamp(time++, PROCESS_0); Event event2 = TestEventUtils.createFailEvent(time++, PROCESS_0); Event event3 = TestEventUtils.invokeTimestamp(time++, PROCESS_0); Event event4 = TestEventUtils.timestampOk(time++, PROCESS_0, "1"); CheckerTestUtils.assertNoErrors(NonOverlappingReadsMonotonicChecker::new, event1, event2, event3, event4); }
@Test public void shouldIgnoreOverlappingFailure() { long time = 0; Event event1 = TestEventUtils.invokeTimestamp(time++, PROCESS_0); Event event3 = TestEventUtils.invokeTimestamp(time++, PROCESS_1); Event event2 = TestEventUtils.createFailEvent(time++, PROCESS_0); Event event4 = TestEventUtils.timestampOk(time++, PROCESS_1, "1"); CheckerTestUtils.assertNoErrors(NonOverlappingReadsMonotonicChecker::new, event1, event2, event3, event4); }