Skip to content

Commit

Permalink
Do not fail on close() if test Kudu server is not initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
losipiuk committed Mar 1, 2022
1 parent 42d6342 commit fef4b2d
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ protected QueryRunner createQueryRunner()
@AfterClass(alwaysRun = true)
public final void destroy()
{
kuduServer.close();
if (kuduServer != null) {
kuduServer.close();
kuduServer = null;
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ protected QueryRunner createQueryRunner()
@AfterClass(alwaysRun = true)
public final void destroy()
{
kuduServer.close();
if (kuduServer != null) {
kuduServer.close();
kuduServer = null;
}
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ protected QueryRunner createQueryRunner()
@AfterClass(alwaysRun = true)
public final void destroy()
{
kuduServer.close();
if (kuduServer != null) {
kuduServer.close();
kuduServer = null;
}
}

@Test(timeOut = 30_000)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ protected QueryRunner createQueryRunner()
@AfterClass(alwaysRun = true)
public final void destroy()
{
kuduServer.close();
if (kuduServer != null) {
kuduServer.close();
kuduServer = null;
}
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ protected QueryRunner createQueryRunner()
@AfterClass(alwaysRun = true)
public final void destroy()
{
kuduServer.close();
if (kuduServer != null) {
kuduServer.close();
kuduServer = null;
}
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ protected QueryRunner createQueryRunner()
@AfterClass(alwaysRun = true)
public final void destroy()
{
kuduServer.close();
if (kuduServer != null) {
kuduServer.close();
kuduServer = null;
}
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ protected QueryRunner createQueryRunner()
@AfterClass(alwaysRun = true)
public final void destroy()
{
kuduServer.close();
if (kuduServer != null) {
kuduServer.close();
kuduServer = null;
}
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ protected QueryRunner createQueryRunner()
@AfterClass(alwaysRun = true)
public final void destroy()
{
kuduServer.close();
if (kuduServer != null) {
kuduServer.close();
kuduServer = null;
}
}

@Test
Expand Down

0 comments on commit fef4b2d

Please sign in to comment.