Github user mans2singh commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2562#discussion_r177296457
--- Diff:
nifi-nar-bundles/nifi-influxdb-bundle/nifi-influxdb-processors/src/test/java/org/apache/nifi/processors/influxdb/AbstractITInfluxDB.java
---
@@ -36,14 +36,7 @@
protected void initInfluxDB() throws InterruptedException, Exception {
influxDB = InfluxDBFactory.connect(dbUrl,user,password);
- if ( influxDB.databaseExists(dbName) ) {
- QueryResult result = influxDB.query(new Query("DROP
measurement water", dbName));
- checkError(result);
- result = influxDB.query(new Query("DROP measurement testm",
dbName));
- checkError(result);
- result = influxDB.query(new Query("DROP database " + dbName,
dbName));
- Thread.sleep(1000);
- }
+ cleanUpDatabase();
--- End diff --
I call the cleanup in setup as a precaution so that if there is any
conflicting/previously existing data in the test database, it is removed and
does not fail the integration test which depend on number of rows inserted. If
you think it is unnecessary, I can remove it.
---