Codota Logo
JepsenHistoryChecker.checkClojureHistory
Code IndexAdd Codota to your IDE (free)

How to use
checkClojureHistory
method
in
com.palantir.atlasdb.jepsen.JepsenHistoryChecker

Best Java code snippets using com.palantir.atlasdb.jepsen.JepsenHistoryChecker.checkClojureHistory (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: palantir/atlasdb

private Map<Keyword, Object> runJepsenChecker(Checker ... checkers) {
  JepsenHistoryChecker jepsenChecker = new JepsenHistoryChecker(checkers);
  return jepsenChecker.checkClojureHistory(ImmutableList.of(INFO_EVENT));
}
origin: palantir/atlasdb

@Test
public void historyWithUnrecognisedShouldThrow() {
  Checker checker = mock(Checker.class);
  JepsenHistoryChecker jepsenChecker = new JepsenHistoryChecker(checker);
  assertThatThrownBy(() -> jepsenChecker.checkClojureHistory(ImmutableList.of(UNRECOGNISED_EVENT)))
      .isInstanceOf(Exception.class);
}
origin: palantir/atlasdb

@Test
public void correctExampleHistoryShouldReturnValidAndNoErrors() throws IOException {
  List<Map<Keyword, ?>> convertedAllEvents = getClojureMapFromFile("correct_history.json");
  Map<Keyword, Object> results = JepsenHistoryCheckers.createWithTimestampCheckers()
      .checkClojureHistory(convertedAllEvents);
  assertThat(results).containsEntry(Keyword.intern("valid?"), true);
  assertThat(results).containsEntry(Keyword.intern("errors"), ImmutableList.of());
}
origin: palantir/atlasdb

@Test
public void correctLockTestHistoryShouldReturnValidAndNoErrors() throws IOException {
  List<Map<Keyword, ?>> convertedAllEvents = getClojureMapFromFile("lock_test_without_nemesis.json");
  Map<Keyword, Object> results = JepsenHistoryCheckers.createWithLockCheckers()
      .checkClojureHistory(convertedAllEvents);
  assertThat(results).containsEntry(Keyword.intern("valid?"), true);
  assertThat(results).containsEntry(Keyword.intern("errors"), ImmutableList.of());
}
origin: palantir/atlasdb

@Test
public void livenessFailingHistoryShouldReturnInvalidWithNemesisErrors() throws IOException {
  List<Map<Keyword, ?>> convertedAllEvents = getClojureMapFromFile("liveness_failing_history.json");
  Map<Keyword, Object> results = JepsenHistoryCheckers.createWithCheckers(
      ImmutableList.<Supplier<Checker>>builder()
          .addAll(JepsenHistoryCheckers.TIMESTAMP_CHECKERS)
          .add(NemesisResilienceChecker::new)
          .build())
      .checkClojureHistory(convertedAllEvents);
  Map<Keyword, ?> nemesisStartEventMap = ImmutableMap.of(
      Keyword.intern("f"), "start",
      Keyword.intern("process"), JepsenConstants.NEMESIS_PROCESS,
      Keyword.intern("type"), "info",
      Keyword.intern("value"), "start!",
      Keyword.intern("time"), 18784227842L);
  Map<Keyword, ?> nemesisStopEventMap = ImmutableMap.of(
      Keyword.intern("f"), "stop",
      Keyword.intern("process"), JepsenConstants.NEMESIS_PROCESS,
      Keyword.intern("type"), "info",
      Keyword.intern("value"), "stop!",
      Keyword.intern("time"), 18805796986L);
  List<Map<Keyword, ?>> expected = ImmutableList.of(nemesisStartEventMap, nemesisStopEventMap);
  assertThat(results).containsEntry(Keyword.intern("valid?"), false);
  assertThat(results).containsEntry(Keyword.intern("errors"), expected);
}
com.palantir.atlasdb.jepsenJepsenHistoryCheckercheckClojureHistory

Javadoc

Parses a history of events from a Jepsen test of the timestamp service, and verifies that it fits the model. In particular, the timestamp values should be monotonically increasing for each process. See MonotonicChecker for more details.

Popular methods of JepsenHistoryChecker

  • <init>
  • checkHistory
  • convertClojureHistoryToEventList
  • convertEventListToClojureHistory
  • createClojureMapFromResults
  • getCheckers

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSystemService (Context)
  • getContentResolver (Context)
  • onRequestPermissionsResult (Fragment)
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • JButton (javax.swing)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.This exception may include information for locating the er
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now