From f9e8b4ef2cb12eba28273b0c1f87d22e0cb6ef32 Mon Sep 17 00:00:00 2001 From: Piyush Bisen Date: Wed, 31 Jul 2019 11:23:21 +0530 Subject: [PATCH] Added null check condition in tests --- core/src/test/scala/io/snappydata/CommandLineToolsSuite.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/test/scala/io/snappydata/CommandLineToolsSuite.scala b/core/src/test/scala/io/snappydata/CommandLineToolsSuite.scala index c69eaf0008..da55452a9c 100644 --- a/core/src/test/scala/io/snappydata/CommandLineToolsSuite.scala +++ b/core/src/test/scala/io/snappydata/CommandLineToolsSuite.scala @@ -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"), @@ -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"),