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 9369336 commit f9e8b4e
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 f9e8b4e

Please sign in to comment.