Skip to content

Commit 73c3b0d

Browse files
committed
test: added repeated init test
1 parent 7f4c68c commit 73c3b0d

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

test/Test.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ void Test::run() {
8787
testFluxParserErrorInRow();
8888
testBasicFunction();
8989
testInit();
90+
testRepeatedInit();
9091
testV1();
9192
testUserAgent();
9293
testHTTPReadTimeout();
@@ -458,6 +459,18 @@ void Test::testHTTPReadTimeout() {
458459
deleteAll(Test::apiUrl);
459460
}
460461

462+
void Test::testRepeatedInit() {
463+
TEST_INIT("testRepeatedInit");
464+
InfluxDBClient client;
465+
//waitServer(Test::managementUrl, true);
466+
for(int i = 0; i<20;i++) {
467+
client.setConnectionParams(Test::apiUrl, Test::orgName, Test::bucketName, Test::token);
468+
TEST_ASSERT(client.validateConnection());
469+
}
470+
TEST_END();
471+
deleteAll(Test::apiUrl);
472+
}
473+
461474
void Test::testRetryOnFailedConnection() {
462475
TEST_INIT("testRetryOnFailedConnection");
463476

test/Test.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ class Test {
7676
static void testRetryInterval();
7777
static void testDefaultTags();
7878
static void testUrlEncode();
79+
static void testRepeatedInit();
7980
};
8081

8182
bool testAssertm(int line, bool state,String message);

0 commit comments

Comments
 (0)