diff options
author | scwf <wangfei1@huawei.com> | 2014-10-09 13:22:36 -0700 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2014-10-09 13:22:41 -0700 |
commit | 2c8851343a2e4d1d5b3a2b959eaa651a92982a72 (patch) | |
tree | 75126e40d206acdf56999837562545f0b5521272 /python/run-tests | |
parent | 752e90f15e0bb82d283f05eff08df874b48caed9 (diff) | |
download | spark-2c8851343a2e4d1d5b3a2b959eaa651a92982a72.tar.gz spark-2c8851343a2e4d1d5b3a2b959eaa651a92982a72.tar.bz2 spark-2c8851343a2e4d1d5b3a2b959eaa651a92982a72.zip |
[SPARK-3806][SQL] Minor fix for CliSuite
To fix two issues in CliSuite
1 CliSuite throw IndexOutOfBoundsException:
Exception in thread "Thread-6" java.lang.IndexOutOfBoundsException: 6
at scala.collection.mutable.ResizableArray$class.apply(ResizableArray.scala:43)
at scala.collection.mutable.ArrayBuffer.apply(ArrayBuffer.scala:47)
at org.apache.spark.sql.hive.thriftserver.CliSuite.org$apache$spark$sql$hive$thriftserver$CliSuite$$captureOutput$1(CliSuite.scala:67)
at org.apache.spark.sql.hive.thriftserver.CliSuite$$anonfun$4.apply(CliSuite.scala:78)
at org.apache.spark.sql.hive.thriftserver.CliSuite$$anonfun$4.apply(CliSuite.scala:78)
at scala.sys.process.ProcessLogger$$anon$1.out(ProcessLogger.scala:96)
at scala.sys.process.BasicIO$$anonfun$processOutFully$1.apply(BasicIO.scala:135)
at scala.sys.process.BasicIO$$anonfun$processOutFully$1.apply(BasicIO.scala:135)
at scala.sys.process.BasicIO$.readFully$1(BasicIO.scala:175)
at scala.sys.process.BasicIO$.processLinesFully(BasicIO.scala:179)
at scala.sys.process.BasicIO$$anonfun$processFully$1.apply(BasicIO.scala:164)
at scala.sys.process.BasicIO$$anonfun$processFully$1.apply(BasicIO.scala:162)
at scala.sys.process.ProcessBuilderImpl$Simple$$anonfun$3.apply$mcV$sp(ProcessBuilderImpl.scala:73)
at scala.sys.process.ProcessImpl$Spawn$$anon$1.run(ProcessImpl.scala:22)
Actually, it is the Mutil-Threads lead to this problem.
2 Using ```line.startsWith``` instead ```line.contains``` to assert expected answer. This is a tiny bug in CliSuite, for test case "Simple commands", there is a expected answers "5", if we use ```contains``` that means output like "14/10/06 11:```5```4:36 INFO CliDriver: Time taken: 1.078 seconds" or "14/10/06 11:54:36 INFO StatsReportListener: 0% ```5```% 10% 25% 50% 75% 90% 95% 100%" will make the assert true.
Author: scwf <wangfei1@huawei.com>
Closes #2666 from scwf/clisuite and squashes the following commits:
11430db [scwf] fix-clisuite
Diffstat (limited to 'python/run-tests')
0 files changed, 0 insertions, 0 deletions