Skip to content

Commit

Permalink
Update TestDataFromServer.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Klay committed Oct 19, 2021
1 parent b5b6998 commit a664002
Showing 1 changed file with 12 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ public void testAllSchemaType() {
Assert.assertEquals(ValueWrapper.NullType.__NULL__,
properties.get("hobby").asNull().getNullType());

} catch (IOErrorException | UnsupportedEncodingException
| ClientServerIncompatibleException e) {
} catch (IOErrorException | UnsupportedEncodingException e) {
e.printStackTrace();
assert false;
}
Expand All @@ -195,8 +194,7 @@ public void testList() {
}
Assert.assertEquals(names.stream().sorted().collect(Collectors.toList()),
listVal.stream().sorted().collect(Collectors.toList()));
} catch (IOErrorException | UnsupportedEncodingException
| ClientServerIncompatibleException e) {
} catch (IOErrorException | UnsupportedEncodingException e) {
e.printStackTrace();
assert false;
}
Expand All @@ -222,8 +220,7 @@ public void testSet() {
Assert.assertEquals(result.toString(),
"ColumnName: [{\"name\",\"name\",\"age\",\"birthday\"}], "
+ "Rows: [[\"name\", \"birthday\", \"age\"]]");
} catch (IOErrorException | UnsupportedEncodingException
| ClientServerIncompatibleException e) {
} catch (IOErrorException | UnsupportedEncodingException e) {
e.printStackTrace();
assert false;
}
Expand All @@ -248,8 +245,7 @@ public void testMap() {
assert mapVals.containsKey("birthday");
assert mapVals.get("birthday").isString();
Assert.assertEquals("2010-10-10", mapVals.get("birthday").asString());
} catch (IOErrorException | UnsupportedEncodingException
| ClientServerIncompatibleException e) {
} catch (IOErrorException | UnsupportedEncodingException e) {
e.printStackTrace();
assert false;
}
Expand All @@ -275,8 +271,7 @@ public void testNode() {
node.keys("student").stream().sorted().collect(Collectors.toList()));
Assert.assertEquals(14, node.properties("person").keySet().size());
Assert.assertEquals(1, node.properties("student").keySet().size());
} catch (IOErrorException | UnsupportedEncodingException
| ClientServerIncompatibleException e) {
} catch (IOErrorException | UnsupportedEncodingException e) {
e.printStackTrace();
assert false;
}
Expand Down Expand Up @@ -313,8 +308,7 @@ public void testRelationship() {
Assert.assertEquals(
"(\"Bob\")-[:friend@100{start_year: 2018, end_year: 2020}]->(\"Lily\")",
result2.rowValues(0).get(0).asRelationship().toString());
} catch (IOErrorException | UnsupportedEncodingException
| ClientServerIncompatibleException e) {
} catch (IOErrorException | UnsupportedEncodingException e) {
e.printStackTrace();
assert false;
}
Expand Down Expand Up @@ -343,8 +337,7 @@ public void testPath() {
Assert.assertEquals("Bob", path.getStartNode().getId().asString());
Assert.assertEquals("Jerry", path.getEndNode().getId().asString());
Assert.assertEquals(2, path.length());
} catch (IOErrorException | UnsupportedEncodingException
| ClientServerIncompatibleException e) {
} catch (IOErrorException | UnsupportedEncodingException e) {
e.printStackTrace();
assert false;
}
Expand Down Expand Up @@ -384,8 +377,7 @@ public void tesDataset() {
+ "(\"a\" )<-[:like@0{}]-(\"b\" )<-[:like@0{}]-(\"c\" ), "
+ "(\"a\" )-[:like@0{}]->(\"f\" )<-[:like@0{}]-(\"c\" )]";
Assert.assertEquals(expectString, result.toString());
} catch (IOErrorException | InterruptedException
| ClientServerIncompatibleException e) {
} catch (IOErrorException | InterruptedException e) {
e.printStackTrace();
assert false;
}
Expand All @@ -396,7 +388,7 @@ public void testErrorResult() {
try {
ResultSet result = session.execute("FETCH PROP ON no_exist_tag \"nobody\"");
Assert.assertTrue(result.toString().contains("ExecutionResponse"));
} catch (IOErrorException | ClientServerIncompatibleException e) {
} catch (IOErrorException e) {
e.printStackTrace();
assert false;
}
Expand All @@ -416,7 +408,7 @@ public void testBasicTypeForJson() {
// check space name
String spaceName = resp.getJSONArray("results").getJSONObject(0).getString("spaceName");
Assert.assertEquals(spaceName, "test_data");
} catch (IOErrorException | ClientServerIncompatibleException e) {
} catch (IOErrorException e) {
e.printStackTrace();
assert false;
}
Expand All @@ -435,7 +427,7 @@ public void testComplexTypeForJson() {
+ "-09-10T02:08:02.0Z\",\"student.name\":\"Bob\",\"person.child_name\":\"Hello"
+ " Worl\",\"person.property\":1000,\"person.morning\":\"23:10:00.000000Z\",\""
+ "person.start_school\":\"2017-09-10\",\"person.friends\":10}]");
} catch (IOErrorException | ClientServerIncompatibleException e) {
} catch (IOErrorException e) {
e.printStackTrace();
assert false;
}
Expand All @@ -455,7 +447,7 @@ public void testErrorForJson() {

// check error message
Assert.assertEquals(message, "SemanticError: `invalidTag': Unknown tag");
} catch (IOErrorException | ClientServerIncompatibleException e) {
} catch (IOErrorException e) {
e.printStackTrace();
assert false;
}
Expand Down

0 comments on commit a664002

Please sign in to comment.