Thread hangs when a shell command is executed
**Description:**

Thread hangs when a shell command is executed. The shutdown method is not called in the ShellExecutor. 
diff --git a/common/src/main/java/org/wso2/testgrid/common/ShellExecutor.java b/common/src/main/java/org/wso2/testgrid/common/ShellExecutor.java
index d0be5ae9..e3acb5a6 100644
--- a/common/src/main/java/org/wso2/testgrid/common/ShellExecutor.java
+++ b/common/src/main/java/org/wso2/testgrid/common/ShellExecutor.java
@@ -30,6 +30,7 @@ import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.Path;
+import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.function.Consumer;
 
@@ -96,6 +97,8 @@ public class ShellExecutor {
             logger.debug("Running shell command : " + command + ", from directory : " + workingDirectory.toString());
         }
         ProcessBuilder processBuilder = new ProcessBuilder("/bin/bash", "-c", command);
+        ExecutorService executor = Executors.newFixedThreadPool(2);
+
         try {
             if (workingDirectory != null) {
                 File workDirectory = workingDirectory.toFile();
@@ -107,8 +110,9 @@ public class ShellExecutor {
 
             StreamGobbler outputStreamGobbler = new StreamGobbler(process.getInputStream(), logger::info);
             StreamGobbler errorStreamGobbler = new StreamGobbler(process.getErrorStream(), logger::error);
-            Executors.newSingleThreadExecutor().submit(outputStreamGobbler);
-            Executors.newSingleThreadExecutor().submit(errorStreamGobbler);
+
+            executor.submit(outputStreamGobbler);
+            executor.submit(errorStreamGobbler);
 
             return process.waitFor() == 0;
 
@@ -120,6 +124,8 @@ public class ShellExecutor {
             throw new CommandExecutionException(
                     "InterruptedException occurred while executing the command '" + command + "', " + "from directory '"
                             + workingDirectory.toString(), e);
+        } finally {
+            executor.shutdownNow();
         }
     }
 }
['common/src/main/java/org/wso2/testgrid/common/ShellExecutor.java']