From 125707f9e1168f047d60b249ae2c6c2be64588a1 Mon Sep 17 00:00:00 2001 From: Nicole00 Date: Thu, 16 Sep 2021 14:36:17 +0800 Subject: [PATCH] skip the empty scan result --- .../client/storage/StorageClientTest.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/client/src/test/java/com/vesoft/nebula/client/storage/StorageClientTest.java b/client/src/test/java/com/vesoft/nebula/client/storage/StorageClientTest.java index b8e87d5c1..0b2722ee8 100644 --- a/client/src/test/java/com/vesoft/nebula/client/storage/StorageClientTest.java +++ b/client/src/test/java/com/vesoft/nebula/client/storage/StorageClientTest.java @@ -67,6 +67,9 @@ public void testScanVertexWithNoCol() { e.printStackTrace(); assert (false); } + if (result.isEmpty()) { + continue; + } Assert.assertEquals(1, result.getPropNames().size()); assert (result.getPropNames().get(0).equals("_vid")); assert (result.isAllSuccess()); @@ -118,6 +121,9 @@ public void testScanVertexWithCols() { e.printStackTrace(); assert (false); } + if (result.isEmpty()) { + continue; + } Assert.assertEquals(3, result.getPropNames().size()); assert (result.getPropNames().get(0).equals("_vid")); assert (result.getPropNames().get(1).equals("name")); @@ -179,6 +185,9 @@ public void testScanVertexWithAllCol() { e.printStackTrace(); assert (false); } + if (result.isEmpty()) { + continue; + } Assert.assertEquals(3, result.getPropNames().size()); assert (result.getPropNames().get(0).equals("_vid")); assert (Arrays.asList("name", "age").contains(result.getPropNames().get(1))); @@ -206,6 +215,9 @@ public void testScanEdgeWithoutCol() { e.printStackTrace(); assert (false); } + if (result.isEmpty()) { + continue; + } Assert.assertEquals(3, result.getPropNames().size()); assert (result.getPropNames().get(0).equals("_src")); assert (result.getPropNames().get(1).equals("_dst")); @@ -265,6 +277,9 @@ public void testScanEdgeWithCols() { e.printStackTrace(); assert (false); } + if (result.isEmpty()) { + continue; + } Assert.assertEquals(4, result.getPropNames().size()); assert (result.getPropNames().get(0).equals("_src")); assert (result.getPropNames().get(1).equals("_dst")); @@ -330,6 +345,9 @@ public void testScanEdgeWithAllCols() { e.printStackTrace(); assert (false); } + if (result.isEmpty()) { + continue; + } Assert.assertEquals(4, result.getPropNames().size()); assert (Arrays.asList("_src", "_dst", "_rank", "likeness") .contains(result.getPropNames().get(0)));