Search in sources :

Example 6 with NodeCheckerResponse

use of com.github.diegopacheco.dynomite.cluster.checker.context.NodeCheckerResponse in project dynomite-cluster-checker by diegopacheco.

the class CheckerResponseTest method shouldNotBreakWhenThereIsNoInsertTime.

@Test
public void shouldNotBreakWhenThereIsNoInsertTime() {
    NodeCheckerResponse checkerResponse = new NodeCheckerResponse("172.28.198.18:8102:rack1:default_dc:100", null, "0", false, "localhost");
    String content = checkerResponse.toPrettyTelemetryJson();
    assertTrue(content.contains("\"server\":\"localhost\""));
    assertTrue(content.contains("\"seeds\":\"172.28.198.18:8102:rack1:default_dc:100\""));
    assertTrue(content.contains("\"getTime\":\"0\""));
    assertTrue(content.contains("\"insertError\":\"0\""));
    assertTrue(content.contains("\"getError\":\"0\""));
    assertTrue(content.contains("\"consistency\":\"1\""));
}
Also used : NodeCheckerResponse(com.github.diegopacheco.dynomite.cluster.checker.context.NodeCheckerResponse) Test(org.junit.Test)

Aggregations

NodeCheckerResponse (com.github.diegopacheco.dynomite.cluster.checker.context.NodeCheckerResponse)6 Chronometer (com.github.diegopacheco.dynomite.cluster.checker.util.Chronometer)3 DynomiteNodeInfo (com.github.diegopacheco.dynomite.cluster.checker.parser.DynomiteNodeInfo)2 RedisClientCache (com.github.diegopacheco.dynomite.cluster.checker.cluster.cache.RedisClientCache)1 ExecutionContext (com.github.diegopacheco.dynomite.cluster.checker.context.ExecutionContext)1 ExecutionReport (com.github.diegopacheco.dynomite.cluster.checker.context.ExecutionReport)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Collectors (java.util.stream.Collectors)1 Logger (org.apache.log4j.Logger)1 Test (org.junit.Test)1 Jedis (redis.clients.jedis.Jedis)1