Skip to content

Commit

Permalink
align parameter name of test
Browse files Browse the repository at this point in the history
  • Loading branch information
Thespica committed Nov 15, 2024
1 parent 71b5b32 commit 1bb75cd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public void testCreateAndDropGraph() {

Assert.assertEquals(initialGraphNumber + 1, graphsAPI.list().size());

HugeClient client = new HugeClient(baseClient(), DEFAULT_GRAPHSPACE, GRAPH2);
HugeClient client = new HugeClient(baseClient(), GRAPHSPACE, GRAPH2);
// Insert graph schema and data
initPropertyKey(client);
initVertexLabel(client);
Expand Down Expand Up @@ -209,7 +209,7 @@ public void testCloneAndDropGraph() {

Assert.assertEquals(initialGraphNumber + 1, graphsAPI.list().size());

HugeClient client = new HugeClient(baseClient(), DEFAULT_GRAPHSPACE, GRAPH3);
HugeClient client = new HugeClient(baseClient(), GRAPHSPACE, GRAPH3);
// Insert graph schema and data
initPropertyKey(client);
initVertexLabel(client);
Expand Down Expand Up @@ -274,7 +274,8 @@ public void testCloneAndDropGraphWithoutConfig() {

Assert.assertEquals(initialGraphNumber + 1, graphsAPI.list().size());

HugeClient client = new HugeClient(baseClient(), DEFAULT_GRAPHSPACE, GRAPH3);
HugeClient client = new HugeClient(baseClient(), GRAPHSPACE, GRAPH3);
// Insert graph schema and data
initPropertyKey(client);
initVertexLabel(client);
initEdgeLabel(client);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void teardown() throws Exception {

@Test
public void testHttpsClientBuilderWithConnection() {
client = HugeClient.builder(BASE_URL, DEFAULT_GRAPHSPACE, GRAPH)
client = HugeClient.builder(BASE_URL, GRAPHSPACE, GRAPH)
.configUser(USERNAME, PASSWORD)
.configSSL(TRUST_STORE_PATH, TRUST_STORE_PASSWORD)
.build();
Expand All @@ -70,7 +70,7 @@ public void testHttpsClientBuilderWithConnection() {

@Test
public void testHttpsClientWithConnectionPoolNoUserParam() {
client = HugeClient.builder(BASE_URL, DEFAULT_GRAPHSPACE, GRAPH)
client = HugeClient.builder(BASE_URL, GRAPHSPACE, GRAPH)
.configConnectTimeout(3)
.configReadTimeout(10)
.configPool(MAX_CONNS, MAX_CONNS_PER_ROUTE)
Expand All @@ -82,7 +82,7 @@ public void testHttpsClientWithConnectionPoolNoUserParam() {

@Test
public void testHttpsClientWithConnectionPoolNoTimeOutParam() {
client = HugeClient.builder(BASE_URL, DEFAULT_GRAPHSPACE, GRAPH)
client = HugeClient.builder(BASE_URL, GRAPHSPACE, GRAPH)
.configUser(USERNAME, PASSWORD)
.configPool(MAX_CONNS, MAX_CONNS_PER_ROUTE)
.configSSL(TRUST_STORE_PATH, TRUST_STORE_PASSWORD)
Expand All @@ -93,7 +93,7 @@ public void testHttpsClientWithConnectionPoolNoTimeOutParam() {

@Test
public void testHttpsClientNewBuilderWithConnectionNoPoolParam() {
client = HugeClient.builder(BASE_URL, DEFAULT_GRAPHSPACE, GRAPH)
client = HugeClient.builder(BASE_URL, GRAPHSPACE, GRAPH)
.configUser(USERNAME, PASSWORD)
.configTimeout(TIMEOUT)
.configSSL(TRUST_STORE_PATH, TRUST_STORE_PASSWORD)
Expand All @@ -104,7 +104,7 @@ public void testHttpsClientNewBuilderWithConnectionNoPoolParam() {

@Test
public void testHttpsClientNewBuilderWithConnectionPool() {
client = HugeClient.builder(BASE_URL, DEFAULT_GRAPHSPACE, GRAPH)
client = HugeClient.builder(BASE_URL, GRAPHSPACE, GRAPH)
.configUser(USERNAME, PASSWORD)
.configTimeout(TIMEOUT)
.configPool(MAX_CONNS, MAX_CONNS_PER_ROUTE)
Expand All @@ -117,7 +117,7 @@ public void testHttpsClientNewBuilderWithConnectionPool() {

@Test
public void testHttpsClientNewBuilderZeroPoolParam() {
client = HugeClient.builder(BASE_URL, DEFAULT_GRAPHSPACE, GRAPH)
client = HugeClient.builder(BASE_URL, GRAPHSPACE, GRAPH)
.configUser(USERNAME, PASSWORD)
.configTimeout(TIMEOUT)
.configPool(0, 0)
Expand All @@ -130,7 +130,7 @@ public void testHttpsClientNewBuilderZeroPoolParam() {
@Test
public void testHttpsClientBuilderWithConnectionPoolNoParam() {
Assert.assertThrows(IllegalArgumentException.class, () -> {
HugeClient.builder(BASE_URL, DEFAULT_GRAPHSPACE, GRAPH)
HugeClient.builder(BASE_URL, GRAPHSPACE, GRAPH)
.configUrl(null)
.configGraph(null)
.configSSL("", "")
Expand All @@ -144,7 +144,7 @@ public void testHttpsClientBuilderWithConnectionPoolNoParam() {
@Test
public void testHttpsClientBuilderWithConnectionPoolNoGraphParam() {
Assert.assertThrows(IllegalArgumentException.class, () -> {
HugeClient.builder(BASE_URL, DEFAULT_GRAPHSPACE, GRAPH)
HugeClient.builder(BASE_URL, GRAPHSPACE, GRAPH)
.configGraph(null)
.configSSL("", "")
.build();
Expand All @@ -157,7 +157,7 @@ public void testHttpsClientBuilderWithConnectionPoolNoGraphParam() {
@Test
public void testHttpsClientBuilderWithConnectionPoolZeroIdleTimeParam() {
Assert.assertThrows(IllegalArgumentException.class, () -> {
HugeClient.builder(BASE_URL, DEFAULT_GRAPHSPACE, GRAPH)
HugeClient.builder(BASE_URL, GRAPHSPACE, GRAPH)
.configIdleTime(0)
.build();
}, e -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@
public class HugeClientTest {

protected static final String BASE_URL = "http://127.0.0.1:8080";
protected static final String GRAPHSPACE = "DEFAULT";
protected static final String GRAPH = "hugegraph";
protected static final String USERNAME = "admin";
protected static final String PASSWORD = "pa";

@Test
public void testContext() {
HugeClient client = HugeClient.builder(BASE_URL, "DEFAULT", GRAPH)
HugeClient client = HugeClient.builder(BASE_URL, GRAPHSPACE, GRAPH)
.configUser(USERNAME, PASSWORD)
.configHttpBuilder(builder -> builder.followRedirects(false))
.build();
Expand Down

0 comments on commit 1bb75cd

Please sign in to comment.