Skip to content

Commit

Permalink
update unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
goldenxinxing committed Sep 23, 2022
1 parent 0d3954a commit 08fa1a1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,7 @@ public void testNullTableName() {
@Test
public void testTableNotExists() {
this.req.setTableName("table not exists");
this.req.setIgnoreNonExistingTable(false);
assertThrows(SwValidationException.class,
() -> DataStoreControllerTest.this.controller.queryTable(this.req),
"");
Expand All @@ -649,7 +650,6 @@ public void testTableNotExists() {
@Test
public void testTableNotExistsIgnore() {
this.req.setTableName("table not exists");
this.req.setIgnoreNonExistingTable(true);

var resp = DataStoreControllerTest.this.controller.queryTable(this.req);
assertThat("test", resp.getStatusCode().is2xxSuccessful(), is(true));
Expand Down Expand Up @@ -1216,6 +1216,7 @@ public void testNullTableName() {
@Test
public void testInvalidTableName() {
this.req.getTables().get(0).setTableName("invalid");
this.req.setIgnoreNonExistingTable(false);
assertThrows(SwValidationException.class,
() -> DataStoreControllerTest.this.controller.scanTable(this.req),
"");
Expand All @@ -1224,7 +1225,6 @@ public void testInvalidTableName() {
@Test
public void testTableNotExistsIgnore() {
this.req.getTables().get(0).setTableName("invalid");
this.req.setIgnoreNonExistingTable(true);

var resp = DataStoreControllerTest.this.controller.scanTable(this.req);
assertThat("test", resp.getStatusCode().is2xxSuccessful(), is(true));
Expand Down

0 comments on commit 08fa1a1

Please sign in to comment.