Skip to content

Commit

Permalink
ci: add kokoro change to synth.py (#104)
Browse files Browse the repository at this point in the history
* ci: add kokoro change to synth.py

* skip test that fails when tests are run in parallel

* fix lint errors

Co-authored-by: larkee <larkee@users.noreply.github.com>
  • Loading branch information
larkee and larkee committed Jun 24, 2020
1 parent 8a3f8ca commit 80029eb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions synth.py
Expand Up @@ -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)
3 changes: 3 additions & 0 deletions tests/system/test_system.py
Expand Up @@ -143,6 +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."
)
def test_list_instances(self):
instances = list(Config.CLIENT.list_instances())
# We have added one new instance in `setUpModule`.
Expand Down

0 comments on commit 80029eb

Please sign in to comment.