Skip to content

Commit 5184748

Browse files
committed
tests: revert
1 parent 23943b2 commit 5184748

4 files changed

Lines changed: 8 additions & 30 deletions

File tree

.github/workflows/tests.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -266,19 +266,6 @@ jobs:
266266
export DPF_DEFAULT_GRPC_MODE=insecure
267267
tox --installpkg "$TOX_INSTALLPKG" ${TOX_XARG:+-x "$TOX_XARG"} -e test-api_entry,kill-servers
268268
269-
- name: "Test API test_api"
270-
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2
271-
env:
272-
TOX_INSTALLPKG: ${{ steps.tox-cli-arguments.outputs.TOX_INSTALLPKG }}
273-
TOX_XARG: ${{ steps.tox-cli-arguments.outputs.TOX_XARG }}
274-
with:
275-
timeout_minutes: 10
276-
max_attempts: 2
277-
shell: bash
278-
command: |
279-
export DPF_DEFAULT_GRPC_MODE=insecure
280-
tox --installpkg "$TOX_INSTALLPKG" ${TOX_XARG:+-x "$TOX_XARG"} -e test-api,kill-servers
281-
282269
- name: "Run compatible tests in parallel"
283270
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2
284271
env:

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ doc = [
9797
test = [
9898
"ansys-platform-instancemanagement==1.1.2",
9999
"ansys-tools-common==0.4.3",
100-
"ansys-tools-visualization-interface==1.0.0a1",
101100
"coverage==7.13.4",
102101
"graphviz==0.21",
103102
"imageio==2.37.2",

src/ansys/dpf/core/server_types.py

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,13 @@ def _run_launch_server_process(
174174
def _wait_and_check_server_connection(
175175
process, port, timeout, lines, current_errors, stderr=None, stdout=None
176176
):
177-
lock = Lock()
178177
if not stderr:
179178

180179
def read_stderr():
181180
with io.TextIOWrapper(process.stderr, encoding="utf-8") as log_err:
182181
for line in log_err:
183182
LOG.debug(line)
184-
with lock:
185-
current_errors.append(line)
183+
current_errors.append(line)
186184

187185
stderr = read_stderr
188186
# check to see if the service started
@@ -192,8 +190,7 @@ def read_stdout():
192190
with io.TextIOWrapper(process.stdout, encoding="utf-8") as log_out:
193191
for line in log_out:
194192
LOG.debug(line)
195-
with lock:
196-
lines.append(line)
193+
lines.append(line)
197194

198195
stdout = read_stdout
199196
# must be in the background since the process reader is blocking
@@ -203,12 +200,9 @@ def read_stdout():
203200
t_timeout = time.time() + timeout
204201
started = False
205202
timedout = False
206-
while True:
207-
with lock:
208-
has_errors = len(current_errors) > 0
209-
started = any("server started" in line for line in lines)
210-
if started or has_errors:
211-
break
203+
while not started and len(current_errors) == 0:
204+
# print(lines)
205+
started = any("server started" in line for line in lines)
212206

213207
if time.time() > t_timeout:
214208
if timedout:
@@ -218,14 +212,12 @@ def read_stdout():
218212

219213
# verify there were no errors
220214
time.sleep(0.01)
221-
with lock:
222-
snapshot_errors = list(current_errors)
223-
if snapshot_errors:
215+
if current_errors:
224216
try:
225217
process.kill()
226218
except PermissionError:
227219
pass
228-
errstr = "\n".join(snapshot_errors)
220+
errstr = "\n".join(current_errors)
229221
if (
230222
"Only one usage of each socket address" in errstr
231223
or "port is already allocated" in errstr

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ envlist = pretest,test-{api,documentation,launcher,server,local_server,multi_ser
3434
labels =
3535
localparalleltests = pretest,test-{api,documentation,launcher,server,local_server,multi_server,custom_type_field,operators,server_errors},posttest,kill-servers
3636
othertests = pretest,test-{workflow,remote_workflow,remote_operator,service},posttest,kill-servers
37-
ciparalleltests = test-{documentation,launcher,local_server,multi_server,custom_type_field,operators,server_errors},kill-servers
37+
ciparalleltests = test-{api,documentation,launcher,local_server,multi_server,custom_type_field,operators,server_errors},kill-servers
3838

3939
isolated_build_env = build
4040

0 commit comments

Comments
 (0)