use of org.influxdb.InfluxDB.ConsistencyLevel in project jmxtrans by jmxtrans.
the class InfluxDbWriterTests method writeConsistencyLevelsAreAppliedToBatchPointsBeingWritten.
@Test
public void writeConsistencyLevelsAreAppliedToBatchPointsBeingWritten() throws Exception {
for (ConsistencyLevel consistencyLevel : ConsistencyLevel.values()) {
InfluxDbWriter writer = getTestInfluxDbWriterWithWriteConsistency(consistencyLevel);
writer.doWrite(dummyServer(), dummyQuery(), results);
verify(influxDB, atLeastOnce()).write(messageCaptor.capture());
BatchPoints batchPoints = messageCaptor.getValue();
assertThat(batchPoints.getConsistency()).isEqualTo(consistencyLevel);
}
}
Aggregations