Yida Wu has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/22018 )

Change subject: IMPALA-13510: Unset the environment variable for tuple cache 
tests
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/22018/1/tests/custom_cluster/test_tuple_cache.py
File tests/custom_cluster/test_tuple_cache.py:

http://gerrit.cloudera.org:8080/#/c/22018/1/tests/custom_cluster/test_tuple_cache.py@108
PS1, Line 108:     if os.getenv("TUPLE_CACHE_DIR") is not None:
> I ran a similar experiment and get a different result. I moved unsetenv out
Thanks Michael, you're right. I can't repro the results I got last night, maybe 
I overlooked something in my setup.
Got the code updated and this fails the second test as expected.
class TestTupleCache(TestTupleCacheBase):
  @classmethod
  def setup_class(cls):
    super(TestTupleCacheBase, cls).setup_class()
    if os.getenv("TUPLE_CACHE_DIR") is not None:
      cls.org_tuple_cache_dir = os.getenv("TUPLE_CACHE_DIR")
      os.unsetenv("TUPLE_CACHE_DIR")
    else:
      cls.org_tuple_cache_dir = None
  @classmethod
  def teardown_class(cls):
    if cls.org_tuple_cache_dir is not None:
      os.environ["TUPLE_CACHE_DIR"] = cls.org_tuple_cache_dir
    super(TestTupleCacheBase, cls).teardown_class()
  @CustomClusterTestSuite.with_args(cluster_size=1)
  @pytest.mark.execute_serially
  def test_cache_disabled(self, vector, unique_database):
    self.client.set_configuration(vector.get_value('exec_option'))
    fq_table = "{0}.cache_disabled".format(unique_database)
    self.create_table(fq_table)
    result1 = self.execute_query("SELECT * from {0}".format(fq_table))
    result2 = self.execute_query("SELECT * from {0}".format(fq_table))

    assert result1.success
    assert result2.success
    assert result1.data == result2.data
    assertCounters(result1.runtime_profile, num_hits=0, num_halted=0, 
num_skipped=1)
    assertCounters(result2.runtime_profile, num_hits=0, num_halted=0, 
num_skipped=1)

class TestTupleCache2(TestTupleCacheBase):
  @CustomClusterTestSuite.with_args(cluster_size=1)
  @pytest.mark.execute_serially
  def test_cache_disabled(self, vector, unique_database):
    self.client.set_configuration(vector.get_value('exec_option'))
    fq_table = "{0}.cache_disabled".format(unique_database)
    self.create_table(fq_table)
    result1 = self.execute_query("SELECT * from {0}".format(fq_table))
    result2 = self.execute_query("SELECT * from {0}".format(fq_table))

    assert result1.success
    assert result2.success
    assert result1.data == result2.data
    assertCounters(result1.runtime_profile, num_hits=0, num_halted=0, 
num_skipped=1)
    assertCounters(result2.runtime_profile, num_hits=0, num_halted=0, 
num_skipped=1)



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2b551e533c7c69d5b29ed6ad6af90be57f53c937
Gerrit-Change-Number: 22018
Gerrit-PatchSet: 2
Gerrit-Owner: Yida Wu <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Kurt Deschler <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Yida Wu <[email protected]>
Gerrit-Comment-Date: Tue, 05 Nov 2024 18:34:43 +0000
Gerrit-HasComments: Yes

Reply via email to