Skip to content

Commit 5d1020d

Browse files
authored
test: do not try to test with emulator if java not present (#473)
* test: do not try to test with emulator if java not present
1 parent fb9c0ff commit 5d1020d

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

packages/google-cloud-firestore/noxfile.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,13 @@ def system_emulated(session):
134134
import subprocess
135135
import signal
136136

137+
try:
138+
# https://github.com/googleapis/python-firestore/issues/472
139+
# Kokoro image doesn't have java installed, don't attempt to run emulator.
140+
subprocess.call(["java", "--version"])
141+
except OSError:
142+
session.skip("java not found but required for emulator support")
143+
137144
try:
138145
subprocess.call(["gcloud", "--version"])
139146
except OSError:

packages/google-cloud-firestore/owlbot.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,13 @@ def system_emulated(session):
161161
import subprocess
162162
import signal
163163
164+
try:
165+
# https://github.com/googleapis/python-firestore/issues/472
166+
# Kokoro image doesn't have java installed, don't attempt to run emulator.
167+
subprocess.call(["java", "--version"])
168+
except OSError:
169+
session.skip("java not found but required for emulator support")
170+
164171
try:
165172
subprocess.call(["gcloud", "--version"])
166173
except OSError:

0 commit comments

Comments
 (0)