From 51efbba0096ee629b7f405f8732c222771616e92 Mon Sep 17 00:00:00 2001 From: larkee Date: Tue, 23 Jun 2020 11:00:19 +1000 Subject: [PATCH 1/3] ci: add kokoro change to synth.py --- synth.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/synth.py b/synth.py index 078a866c58..7f9540f72b 100644 --- a/synth.py +++ b/synth.py @@ -163,4 +163,12 @@ "include google/cloud/spanner_v1/gapic/transports/spanner.grpc.config\n", ) +s.replace( + ".kokoro/build.sh", + "# Remove old nox", + "# Set up creating a new instance for each system test run\n" + "export GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE=true\n" + "\n\g<0>", +) + s.shell.run(["nox", "-s", "blacken"], hide_output=False) From 182e32bb81282e62c4a368b51386448483893aed Mon Sep 17 00:00:00 2001 From: larkee Date: Tue, 23 Jun 2020 11:33:20 +1000 Subject: [PATCH 2/3] skip test that fails when tests are run in parallel --- tests/system/test_system.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/system/test_system.py b/tests/system/test_system.py index be6bbdb437..af859fb1e8 100644 --- a/tests/system/test_system.py +++ b/tests/system/test_system.py @@ -143,6 +143,7 @@ def tearDown(self): for instance in self.instances_to_delete: instance.delete() + @unittest.skipIf(CREATE_INSTANCE, "This test fails when system tests are run in parallel.") def test_list_instances(self): instances = list(Config.CLIENT.list_instances()) # We have added one new instance in `setUpModule`. From e792502f7709b779bbfd1ad8975407346467fd88 Mon Sep 17 00:00:00 2001 From: larkee Date: Tue, 23 Jun 2020 13:26:06 +1000 Subject: [PATCH 3/3] fix lint errors --- tests/system/test_system.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/system/test_system.py b/tests/system/test_system.py index af859fb1e8..9fde7db0c3 100644 --- a/tests/system/test_system.py +++ b/tests/system/test_system.py @@ -143,7 +143,9 @@ def tearDown(self): for instance in self.instances_to_delete: instance.delete() - @unittest.skipIf(CREATE_INSTANCE, "This test fails when system tests are run in parallel.") + @unittest.skipIf( + CREATE_INSTANCE, "This test fails when system tests are run in parallel." + ) def test_list_instances(self): instances = list(Config.CLIENT.list_instances()) # We have added one new instance in `setUpModule`.