Philip Zeyliger has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/10053 )

Change subject: IMPALA-6845: TestHdfsQueries causes some tests to be run twice
......................................................................


Patch Set 4:

Nice find!

If you add something like this to tests/conftest.py, we'll be able to prevent 
one of these sneaking up on us. What this is saying is that a given code 
location for a test function should only appear as coming from a single class. 
I found with impala-py.test tests/query_test/ --collect-only -s --pdb that this 
captured your case here. (And, the good news is I don't think we have other 
cases like it!)

 @pytest.hookimpl(trylast=True)
 def pytest_collection_modifyitems(items, config, session):
+  # Find tests that show up via subclassing
+  # ('tests/query_test/test_queries.py', 118, 
"TestHdfsQueries.test_empty[exec_option: {'batch_size': 0, 'num_nodes': 0, 
'disable_codegen_rows_threshold': 0, 'disable_codegen': False, 
'abort_on_error': 1, 'exec_single_node_rows_threshold': 0} | table_f ormat: 
parquet/none]")
+  klass_by_location = dict()
+  for i in items:
+    a, b, name = i.location
+    klass = name.split(".")[0]
+    loc = (a,b)
+    if loc in klass_by_location:
+      assert klass == klass_by_location[loc]
+    else:
+      klass_by_location[loc] = klass
+


--
To view, visit http://gerrit.cloudera.org:8080/10053
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ida659aa7b5131a6a7469baa93a41f7581bd0659a
Gerrit-Change-Number: 10053
Gerrit-PatchSet: 4
Gerrit-Owner: Thomas Tauber-Marshall <tmarsh...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Michael Brown <mi...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <phi...@cloudera.com>
Gerrit-Reviewer: Thomas Tauber-Marshall <tmarsh...@cloudera.com>
Gerrit-Comment-Date: Fri, 13 Apr 2018 22:52:10 +0000
Gerrit-HasComments: No

Reply via email to