add filter for s3select tests

Signed-off-by: gal salomon <gal.salomon@gmail.com>
(cherry picked from commit fce9a52ef4)
This commit is contained in:
gal salomon 2020-07-07 00:10:50 +03:00 committed by Casey Bodley
parent 10c801a2e0
commit 6ea6cb6467

View file

@ -1,5 +1,7 @@
import nose
import random
from nose.plugins.attrib import attr
from . import (
get_client
@ -60,6 +62,7 @@ def generate_s3select_expression_projection(bucket_name,obj_name):
# both results should be close (epsilon)
assert (1 - (float(res.split("\n")[1]) / eval( e )) ) < epsilon
@attr('s3select')
def test_generate_where_clause():
# create small csv file for testing the random expressions
@ -71,6 +74,7 @@ def test_generate_where_clause():
for _ in range(100):
generate_s3select_where_clause(bucket_name,obj_name)
@attr('s3select')
def test_generate_projection():
# create small csv file for testing the random expressions
@ -156,6 +160,7 @@ def create_list_of_int(column_pos,obj,field_split=",",row_split="\n"):
return list_of_int
@attr('s3select')
def test_count_operation():
csv_obj_name = "csv_star_oper"
bucket_name = "test"
@ -166,6 +171,7 @@ def test_count_operation():
nose.tools.assert_equal( num_of_rows, int( res ))
@attr('s3select')
def test_column_sum_min_max():
csv_obj = create_random_csv_object(10000,10)
@ -224,6 +230,7 @@ def test_column_sum_min_max():
nose.tools.assert_equal( int(count)*4 , int(sum1)-int(sum2) )
@attr('s3select')
def test_complex_expressions():
# purpose of test: engine is process correctly several projections containing aggregation-functions
@ -255,6 +262,7 @@ def test_complex_expressions():
nose.tools.assert_equal( res_s3select_between_numbers, res_s3select_eq_modolu)
@attr('s3select')
def test_alias():
# purpose: test is comparing result of exactly the same queries , one with alias the other without.
@ -275,6 +283,7 @@ def test_alias():
nose.tools.assert_equal( res_s3select_alias, res_s3select_no_alias)
@attr('s3select')
def test_alias_cyclic_refernce():
number_of_rows = 10000
@ -292,6 +301,7 @@ def test_alias_cyclic_refernce():
assert int(find_res) >= 0
@attr('s3select')
def test_datetime():
# purpose of test is to validate date-time functionality is correct,
@ -325,6 +335,7 @@ def test_datetime():
nose.tools.assert_equal( res_s3select_date_time_utcnow, res_s3select_count)
@attr('s3select')
def test_csv_parser():
# purpuse: test default csv values(, \n " \ ), return value may contain meta-char
@ -364,6 +375,7 @@ def test_csv_parser():
res_s3select_alias = remove_xml_tags_from_result( run_s3select(bucket_name,csv_obj_name,"select _9 from stdin;") ).replace("\n","")
nose.tools.assert_equal( res_s3select_alias, ',')
@attr('s3select')
def test_csv_definition():
number_of_rows = 10000
@ -393,6 +405,7 @@ def test_csv_definition():
nose.tools.assert_equal( res_s3select, __res )
@attr('s3select')
def test_schema_definition():
number_of_rows = 10000