From c8b3cfda2dd4c5c8f8f7a482e51de82905f22b65 Mon Sep 17 00:00:00 2001 From: Larry Hamel Date: Wed, 7 Dec 2016 15:47:30 -0800 Subject: [PATCH] tinc: fix after change of version naming algo (#1322) -- set MASTER_DATA_DIRECTORY env var during each test -- port of 7cfb44a from tinc repo --- .../tests/utilities/gpexpand/scenarios/run_gpexpand.py | 2 ++ .../mpp/gpdb/tests/utilities/gpexpand/test_gpexpand.py | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/test/tinc/tincrepo/mpp/gpdb/tests/utilities/gpexpand/scenarios/run_gpexpand.py b/src/test/tinc/tincrepo/mpp/gpdb/tests/utilities/gpexpand/scenarios/run_gpexpand.py index f9338cdf62..253a35ce04 100644 --- a/src/test/tinc/tincrepo/mpp/gpdb/tests/utilities/gpexpand/scenarios/run_gpexpand.py +++ b/src/test/tinc/tincrepo/mpp/gpdb/tests/utilities/gpexpand/scenarios/run_gpexpand.py @@ -101,6 +101,8 @@ class GpExpandTests(MPPTestCase): found_uni_idx_msg = True if found_uni_idx_msg == False: + tinctest.logger.error("stdout from failed index in expand command: %s" % results.stdout) + tinctest.logger.error("stderr from failed index in expand command: %s" % results.stderr) self.fail("Message for unique indexes not printed during gpexpand") with open(outfile, 'w') as output_file: diff --git a/src/test/tinc/tincrepo/mpp/gpdb/tests/utilities/gpexpand/test_gpexpand.py b/src/test/tinc/tincrepo/mpp/gpdb/tests/utilities/gpexpand/test_gpexpand.py index 8bfa71a02b..73fb85a56c 100644 --- a/src/test/tinc/tincrepo/mpp/gpdb/tests/utilities/gpexpand/test_gpexpand.py +++ b/src/test/tinc/tincrepo/mpp/gpdb/tests/utilities/gpexpand/test_gpexpand.py @@ -264,6 +264,9 @@ class GPExpandTestCase(MPPTestCase, ScenarioTestCase): # Doing this in setUp to not impact test construction. self.hosts = get_gpexpand_hosts() + mdd = os.path.join(self.testcase_master_dir, 'gpseg-1') + os.environ["MASTER_DATA_DIRECTORY"] = mdd + #initial config has master on HOST1 and segments on HOST2 and HOST3. #If we choose to add only segments ie self.number_of_expansion_hosts == 0, in the interview process we say use HOST1 and HOST2 #if we choose to add expansion hosts ,ie self.number_of_expansion_hosts == 2, in the interview process we say use HOST3 and HOST4 @@ -277,9 +280,6 @@ class GPExpandTestCase(MPPTestCase, ScenarioTestCase): self._do_gpinitstandby() if self.use_filespaces: tinctest.logger.info("Setting filespaces") - mdd = os.path.join(self.testcase_master_dir, 'gpseg-1') - self.org_mdd = os.environ.get("MASTER_DATA_DIRECTORY") - os.environ["MASTER_DATA_DIRECTORY"]=mdd gpfs=Gpfilespace() gpfs.create_filespace('expand_filespace') @@ -563,6 +563,7 @@ class GPExpandTestCase(MPPTestCase, ScenarioTestCase): "use_parallel_expansion": self.use_parallel_expansion, "number_of_parallel_table_redistributed": self.number_of_parallel_table_redistributed, "dbname": os.environ.get('PGDATABASE'), + "output_dir": self.testcase_out_dir, "validate": True})) run_tests_in_parallel.append(('%s.scenarios.run_gpexpand.GpExpandTests.check_number_of_parallel_tables_expanded' %self.package_name, {"number_of_parallel_table_redistributed": self.number_of_parallel_table_redistributed})) -- GitLab