Skip to content

Commit 56b12a8

Browse files
feat: get influxdb version
1 parent 479b4e7 commit 56b12a8

File tree

1 file changed

+15
-0
lines changed
  • src/test/java/com/influxdb/v3/client/integration

1 file changed

+15
-0
lines changed

src/test/java/com/influxdb/v3/client/integration/E2ETest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,21 @@ public void testQueryRowsExceptionCases() throws Exception {
384384
}
385385
}
386386

387+
@EnabledIfEnvironmentVariable(named = "TESTING_INFLUXDB_URL", matches = ".*")
388+
@EnabledIfEnvironmentVariable(named = "TESTING_INFLUXDB_TOKEN", matches = ".*")
389+
@EnabledIfEnvironmentVariable(named = "TESTING_INFLUXDB_DATABASE", matches = ".*")
390+
@Test
391+
public void testPing() throws Exception {
392+
try (InfluxDBClient client = InfluxDBClient.getInstance(
393+
System.getenv("TESTING_INFLUXDB_URL"),
394+
System.getenv("TESTING_INFLUXDB_TOKEN").toCharArray(),
395+
System.getenv("TESTING_INFLUXDB_DATABASE"),
396+
null)) {
397+
398+
Assertions.assertThat(client.ping()).isNotEmpty();
399+
}
400+
}
401+
387402
private void assertGetDataSuccess(@Nonnull final InfluxDBClient influxDBClient) {
388403
influxDBClient.writePoint(
389404
Point.measurement("test1")

0 commit comments

Comments
 (0)