Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pxLi committed Sep 13, 2021
1 parent 7d74179 commit 7d853db
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 16 deletions.
5 changes: 0 additions & 5 deletions integration_tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ only needed when testing integration with pandas.
integration and interoperability with pandas, NumPy, and other software in the Python ecosystem. This is used
to test improved transfer performance to pandas based user defined functions.

### pytest-order
`pip install pytest-order`

`pytest-order` allows you to customize the order in which your tests are run. This is optional.

## pytest-xdist and findspark

`pytest-xdist` and `findspark` can be used to speed up running the tests by running them in parallel.
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/src/main/python/conditionals_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test_if_else_map(data_gen):
'IF(a, b, c)'),
conf = allow_negative_scale_of_decimal_conf)

@pytest.mark.order(1) # put expensive test case at the head of the xdist worker queue
@pytest.mark.order(1) # only effect when pytest-order is installed
@pytest.mark.parametrize('data_gen', all_gens + all_nested_gens, ids=idfn)
def test_case_when(data_gen):
num_cmps = 20
Expand Down
8 changes: 4 additions & 4 deletions integration_tests/src/main/python/generate_expr_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_explode_litarray(data_gen):
'spark.sql.legacy.allowNegativeScaleOfDecimal': 'true'}

@ignore_order(local=True)
@pytest.mark.order(1) # put expensive test case at the head of the xdist worker queue
@pytest.mark.order(1) # only effect when pytest-order is installed
@pytest.mark.parametrize('data_gen', all_gen + struct_gens_sample + array_gens_sample + map_gens_sample, ids=idfn)
def test_explode_array_data(spark_tmp_path, data_gen):
data_gen = [int_gen, ArrayGen(data_gen)]
Expand Down Expand Up @@ -82,7 +82,7 @@ def test_explode_nested_array_data(spark_tmp_path, data_gen):
#sort locally because of https://github.com/NVIDIA/spark-rapids/issues/84
# After 3.1.0 is the min spark version we can drop this
@ignore_order(local=True)
@pytest.mark.order(1) # put expensive test case at the head of the xdist worker queue
@pytest.mark.order(1) # only effect when pytest-order is installed
@pytest.mark.parametrize('data_gen', all_gen + struct_gens_sample + array_gens_sample + map_gens_sample, ids=idfn)
def test_explode_outer_array_data(spark_tmp_path, data_gen):
data_gen = [int_gen, ArrayGen(data_gen)]
Expand Down Expand Up @@ -132,7 +132,7 @@ def test_posexplode_litarray(data_gen):
#sort locally because of https://github.com/NVIDIA/spark-rapids/issues/84
# After 3.1.0 is the min spark version we can drop this
@ignore_order(local=True)
@pytest.mark.order(1) # put expensive test case at the head of the xdist worker queue
@pytest.mark.order(1) # only effect when pytest-order is installed
@pytest.mark.parametrize('data_gen', all_gen + struct_gens_sample + array_gens_sample + map_gens_sample, ids=idfn)
def test_posexplode_array_data(spark_tmp_path, data_gen):
data_gen = [int_gen, ArrayGen(data_gen)]
Expand Down Expand Up @@ -164,7 +164,7 @@ def test_posexplode_nested_array_data(spark_tmp_path, data_gen):
#sort locally because of https://github.com/NVIDIA/spark-rapids/issues/84
# After 3.1.0 is the min spark version we can drop this
@ignore_order(local=True)
@pytest.mark.order(1) # put expensive test case at the head of the xdist worker queue
@pytest.mark.order(1) # only effect when pytest-order is installed
@pytest.mark.parametrize('data_gen', all_gen + struct_gens_sample + array_gens_sample + map_gens_sample, ids=idfn)
def test_posexplode_outer_array_data(spark_tmp_path, data_gen):
data_gen = [int_gen, ArrayGen(data_gen)]
Expand Down
8 changes: 4 additions & 4 deletions integration_tests/src/main/python/join_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def do_join(spark):
# local sort because of https://github.com/NVIDIA/spark-rapids/issues/84
# After 3.1.0 is the min spark version we can drop this
@ignore_order(local=True)
@pytest.mark.order(1) # put expensive test case at the head of the xdist worker queue
@pytest.mark.order(1) # only effect when pytest-order is installed
@pytest.mark.parametrize('data_gen', all_gen + single_level_array_gens, ids=idfn)
@pytest.mark.parametrize('batch_size', ['100', '1g'], ids=idfn) # set the batch size so we can test multiple stream batches
def test_cartesian_join(data_gen, batch_size):
Expand All @@ -258,7 +258,7 @@ def do_join(spark):
# local sort because of https://github.com/NVIDIA/spark-rapids/issues/84
# After 3.1.0 is the min spark version we can drop this
@ignore_order(local=True)
@pytest.mark.order(1) # put expensive test case at the head of the xdist worker queue
@pytest.mark.order(1) # only effect when pytest-order is installed
@pytest.mark.xfail(condition=is_databricks_runtime(),
reason='https://github.com/NVIDIA/spark-rapids/issues/334')
@pytest.mark.parametrize('data_gen', all_gen + single_level_array_gens, ids=idfn)
Expand All @@ -273,7 +273,7 @@ def do_join(spark):
# local sort because of https://github.com/NVIDIA/spark-rapids/issues/84
# After 3.1.0 is the min spark version we can drop this
@ignore_order(local=True)
@pytest.mark.order(1) # put expensive test case at the head of the xdist worker queue
@pytest.mark.order(1) # only effect when pytest-order is installed
@pytest.mark.xfail(condition=is_databricks_runtime(),
reason='https://github.com/NVIDIA/spark-rapids/issues/334')
@pytest.mark.parametrize('data_gen', all_gen, ids=idfn)
Expand All @@ -288,7 +288,7 @@ def do_join(spark):
# local sort because of https://github.com/NVIDIA/spark-rapids/issues/84
# After 3.1.0 is the min spark version we can drop this
@ignore_order(local=True)
@pytest.mark.order(1) # put expensive test case at the head of the xdist worker queue
@pytest.mark.order(1) # only effect when pytest-order is installed
@pytest.mark.parametrize('data_gen', all_gen, ids=idfn)
@pytest.mark.parametrize('batch_size', ['100', '1g'], ids=idfn) # set the batch size so we can test multiple stream batches
def test_cartesian_join_with_condition(data_gen, batch_size):
Expand Down
4 changes: 2 additions & 2 deletions integration_tests/src/main/python/parquet_write_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def limited_timestamp(nullable=True):
parquet_basic_gen + parquet_struct_gen + parquet_array_gen + parquet_decimal_gens + parquet_map_gens]
parquet_ts_write_options = ['INT96', 'TIMESTAMP_MICROS', 'TIMESTAMP_MILLIS']

@pytest.mark.order(1) # put expensive test case at the head of the xdist worker queue
@pytest.mark.order(1) # only effect when pytest-order is installed
@pytest.mark.parametrize('parquet_gens', parquet_write_gens_list, ids=idfn)
@pytest.mark.parametrize('reader_confs', reader_opt_confs)
@pytest.mark.parametrize('v1_enabled_list', ["", "parquet"])
Expand Down Expand Up @@ -118,7 +118,7 @@ def test_write_ts_millis(spark_tmp_path, ts_type, ts_rebase):

# There are race conditions around when individual files are read in for partitioned data
@ignore_order
@pytest.mark.order(1) # put expensive test case at the head of the xdist worker queue
@pytest.mark.order(1) # only effect when pytest-order is installed
@pytest.mark.parametrize('parquet_gen', parquet_part_write_gens, ids=idfn)
@pytest.mark.parametrize('reader_confs', reader_opt_confs)
@pytest.mark.parametrize('v1_enabled_list', ["", "parquet"])
Expand Down

0 comments on commit 7d853db

Please sign in to comment.