Skip to content

Commit

Permalink
upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Caideyipi committed Dec 25, 2024
1 parent 9fd5be7 commit bf3343b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ public void testInsertTablet() {
RestUtils.nonQuery(httpClient, port, sqlHandler("test", sql));
}
String json =
"{\"database\":\"test\",\"column_types\":[\"tag\",\"ATTRIBUTE\",\"field\"],\"timestamps\":[1635232143960,1635232153960,1635232163960,1635232173960,1635232183960],\"column_names\":[\"tag1\",\"t1\",\"s1\"],\"data_types\":[\"STRING\",\"STRING\",\"FLOAT\"],\"values\":[[\"a11\",\"true\",11],[\"a11\",\"false\",22],[\"a13\",\"false1\",23],[\"a14\",\"false2\",24],[\"a15\",\"false3\",25]],\"table\":\"sg211\"}";
"{\"database\":\"test\",\"column_types\":[\"ID\",\"ATTRIBUTE\",\"MEASUREMENT\"],\"timestamps\":[1635232143960,1635232153960,1635232163960,1635232173960,1635232183960],\"column_names\":[\"tag1\",\"t1\",\"s1\"],\"data_types\":[\"STRING\",\"STRING\",\"FLOAT\"],\"values\":[[\"a11\",\"true\",11],[\"a11\",\"false\",22],[\"a13\",\"false1\",23],[\"a14\",\"false2\",24],[\"a15\",\"false3\",25]],\"table\":\"sg211\"}";
rightInsertTablet(json);
}

Expand All @@ -288,7 +288,7 @@ public void testInsertTabletNoDatabase() {
RestUtils.nonQuery(httpClient, port, sqlHandler("test", sql));
}
String json =
"{\"database\":\"\",\"column_types\":[\"tag\",\"ATTRIBUTE\",\"field\"],\"timestamps\":[1635232143960,1635232153960,1635232163960,1635232173960,1635232183960],\"column_names\":[\"tag1\",\"t1\",\"s1\"],\"data_types\":[\"STRING\",\"STRING\",\"FLOAT\"],\"values\":[[\"a11\",\"true\",11],[\"a11\",\"false\",22],[\"a13\",\"false1\",23],[\"a14\",\"false2\",24],[\"a15\",\"false3\",25]],\"table\":\"sg211\"}";
"{\"database\":\"\",\"column_types\":[\"ID\",\"ATTRIBUTE\",\"MEASUREMENT\"],\"timestamps\":[1635232143960,1635232153960,1635232163960,1635232173960,1635232183960],\"column_names\":[\"tag1\",\"t1\",\"s1\"],\"data_types\":[\"STRING\",\"STRING\",\"FLOAT\"],\"values\":[[\"a11\",\"true\",11],[\"a11\",\"false\",22],[\"a13\",\"false1\",23],[\"a14\",\"false2\",24],[\"a15\",\"false3\",25]],\"table\":\"sg211\"}";
JsonObject result = RestUtils.insertTablet(httpClient, port, json);
assertEquals(305, Integer.parseInt(result.get("code").toString()));
}
Expand Down Expand Up @@ -317,7 +317,7 @@ public void testInsertTablet2() {
RestUtils.nonQuery(httpClient, port, sqlHandler("test", sql));
}
String json =
"{\"database\":\"test\",\"column_types\":[\"tag\",\"ATTRIBUTE\",\"field\"],\"timestamps\":[1635232143960,1635232153960,1635232163960,1635232183960],\"column_names\":[\"tag1\",\"t1\",\"s1\"],\"data_types\":[\"STRING\",\"STRING\",\"FLOAT\"],\"values\":[[\"a11\",\"true\",11],[\"a11\",\"false\",22],[\"a13\",\"false1\",23],[\"a14\",\"false2\",24],[\"a15\",\"false3\",25]],\"table\":\"sg211\"}";
"{\"database\":\"test\",\"column_types\":[\"ID\",\"ATTRIBUTE\",\"MEASUREMENT\"],\"timestamps\":[1635232143960,1635232153960,1635232163960,1635232183960],\"column_names\":[\"tag1\",\"t1\",\"s1\"],\"data_types\":[\"STRING\",\"STRING\",\"FLOAT\"],\"values\":[[\"a11\",\"true\",11],[\"a11\",\"false\",22],[\"a13\",\"false1\",23],[\"a14\",\"false2\",24],[\"a15\",\"false3\",25]],\"table\":\"sg211\"}";
JsonObject result = RestUtils.insertTablet(httpClient, port, json);
assertEquals(305, Integer.parseInt(result.get("code").toString()));
assertEquals(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ public void testInsertWithDuplicatedMeasurements() {
"t1",
"insert into wf07(tag1, time, s3, status, status) values('wt01', 100, true, 20.1, 20.2)"));
assertEquals(
"701: Insertion contains duplicated field: status",
"701: Insertion contains duplicated measurement: status",
jsonObject.get("code") + ": " + jsonObject.get("message").getAsString());
}

Expand Down

0 comments on commit bf3343b

Please sign in to comment.