Skip to content

Commit

Permalink
Fix test.sh to return correct error code for hive query failures
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham Tagra committed Jun 28, 2019
1 parent d3c4c0e commit 1a3e1a7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ function check_hadoop() {
}

function run_tests() {
run_in_hadoop_master_container su hdfs -c "hive -e 'SELECT 1'"
run_in_hadoop_master_container su hdfs -c "hive -e 'CREATE TABLE foo (a INT);'"
run_in_hadoop_master_container su hdfs -c "hive -e 'INSERT INTO foo VALUES (54);'"
run_in_hadoop_master_container su hdfs -c "hive -e 'SELECT 1'" &&
run_in_hadoop_master_container su hdfs -c "hive -e 'CREATE TABLE foo (a INT);'" &&
run_in_hadoop_master_container su hdfs -c "hive -e 'INSERT INTO foo VALUES (54);'" &&
# SELECT with WHERE to make sure that map-reduce job is scheduled
run_in_hadoop_master_container su hdfs -c "hive -e 'SELECT a FROM foo WHERE a > 0;'"
}
Expand Down

0 comments on commit 1a3e1a7

Please sign in to comment.