Skip to content

Commit

Permalink
Added null check condition in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Piyush Bisen committed Jul 31, 2019
1 parent a13bd13 commit 3597c63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/test/scala/io/snappydata/CommandLineToolsSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ class CommandLineToolsSuite extends SnappyTestRunner {

test("ODBC_FailOverTest_AddServer_BeforeConn") {
val flag = System.getenv("SNAPPY_NATIVE_ENABLED")
if (flag.equalsIgnoreCase("true")) {
if (flag != null && flag.equalsIgnoreCase("true")) {
var scriptPath = s"$snappyNativeTestDir/failoverTest_AddServer_BeforeConn.sh"
var consoleOutput = s"$scriptPath $snappyProductDir $snappyNativeTestDir".!!
assert(consoleOutput.contains("Test executed successfully connected to"),
Expand All @@ -301,7 +301,7 @@ class CommandLineToolsSuite extends SnappyTestRunner {

test("ODBC_FailOverTest_AddServer_AfterConn") {
val flag = System.getenv("SNAPPY_NATIVE_ENABLED")
if (flag.equalsIgnoreCase("true")) {
if (flag != null && flag.equalsIgnoreCase("true")) {
var scriptPath = s"$snappyNativeTestDir/failoverTest_AddServer_AfterConn.sh"
var consoleOutput = s"$scriptPath $snappyProductDir $snappyNativeTestDir".!!
assert(consoleOutput.contains("Test executed successfully connected to"),
Expand Down

0 comments on commit 3597c63

Please sign in to comment.