Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[api-tests]: Test-Scripts expect different test results #18

Open
TobyTheHutt opened this issue Aug 20, 2023 · 2 comments
Open

[api-tests]: Test-Scripts expect different test results #18

TobyTheHutt opened this issue Aug 20, 2023 · 2 comments
Assignees
Labels
under investigation The issue is currently under investigation by developers
Milestone

Comments

@TobyTheHutt
Copy link

Describe the bug
I encountered an issue while running the provided Python script api_tests.py. I tried to run it both with the provided Shell-scripts and by its own. The script reports an AssertionError with the following message:
AssertionError: Did not get expected completion states [<TransactionStates.FAILED: 3>] but TransactionStates.NEW after 32 retries.

Version of Python and LGS:

  • Python Version: 3.11.4
  • LGS Version: 2.0.4

What happened:
The script is designed to monitor API transactions and wait for them to reach certain completion states. However, the script is raising an assertion error with the mentioned message, indicating that the expected completion state of TransactionStates.FAILED was not reached within the specified number of retries.

I ran the scripts on the same host and the same Docker network on which LGS is running. I can reproduce this behaviour in both our corporate server infrastructure as well as on my local machine.

What you expected to happen:
I expected the script to successfully wait for the transaction to reach the expected TransactionStates.FAILED state.

How to reproduce it (as minimally and precisely as possible):

  1. Run the provided Python script.
  2. Observe the error message mentioned above.

Anything else we need to know:
I have reviewed the script, and the configurations, enumerations, and logic appear to be correct. The issue seems to be related to the API's behaviour or timing.

@TobyTheHutt
Copy link
Author

TobyTheHutt commented Aug 20, 2023

Here is some additional information to how I ran the tests.

Command:
docker run --rm --volume "$(pwd):/api-tests" --network my_lgs_network python:slim-bullseye /bin/bash -c "cd /api-tests && sed -i -e 's/\r$//' *.sh && pip install --proxy http://myproxy.example.com:8080/ -r requirements.txt && ./sequential_test.sh"

The output is always the same:

Test-Script Command Output
Collecting requests (from -r requirements.txt (line 1))
  Downloading requests-2.31.0-py3-none-any.whl (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.6/62.6 kB 1.8 MB/s eta 0:00:00
Collecting pytest (from -r requirements.txt (line 2))
  Downloading pytest-7.4.0-py3-none-any.whl (323 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 323.6/323.6 kB 4.3 MB/s eta 0:00:00
Collecting pytest_tornasync (from -r requirements.txt (line 3))
  Downloading pytest_tornasync-0.6.0.post2-py3-none-any.whl (6.6 kB)
Collecting pytest-xdist (from -r requirements.txt (line 4))
  Downloading pytest_xdist-3.3.1-py3-none-any.whl (41 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.8/41.8 kB 8.7 MB/s eta 0:00:00
Collecting pytest-parallel (from -r requirements.txt (line 5))
  Downloading pytest_parallel-0.1.1-py3-none-any.whl (7.0 kB)
Collecting pytest-stress (from -r requirements.txt (line 6))
  Downloading pytest_stress-1.0.1-py3-none-any.whl (5.2 kB)
Collecting pytest-repeat (from -r requirements.txt (line 7))
  Downloading pytest_repeat-0.9.1-py2.py3-none-any.whl (4.3 kB)
Collecting pytest_steps (from -r requirements.txt (line 8))
  Downloading pytest_steps-1.8.0-py2.py3-none-any.whl (32 kB)
Collecting configparser (from -r requirements.txt (line 9))
  Downloading configparser-6.0.0-py3-none-any.whl (19 kB)
Collecting charset-normalizer<4,>=2 (from requests->-r requirements.txt (line 1))
  Downloading charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (199 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 199.6/199.6 kB 6.0 MB/s eta 0:00:00
Collecting idna<4,>=2.5 (from requests->-r requirements.txt (line 1))
  Downloading idna-3.4-py3-none-any.whl (61 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.5/61.5 kB 12.8 MB/s eta 0:00:00
Collecting urllib3<3,>=1.21.1 (from requests->-r requirements.txt (line 1))
  Downloading urllib3-2.0.4-py3-none-any.whl (123 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 123.9/123.9 kB 14.1 MB/s eta 0:00:00
Collecting certifi>=2017.4.17 (from requests->-r requirements.txt (line 1))
  Downloading certifi-2023.7.22-py3-none-any.whl (158 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 158.3/158.3 kB 6.1 MB/s eta 0:00:00
Collecting iniconfig (from pytest->-r requirements.txt (line 2))
  Downloading iniconfig-2.0.0-py3-none-any.whl (5.9 kB)
Collecting packaging (from pytest->-r requirements.txt (line 2))
  Downloading packaging-23.1-py3-none-any.whl (48 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.9/48.9 kB 7.4 MB/s eta 0:00:00
Collecting pluggy<2.0,>=0.12 (from pytest->-r requirements.txt (line 2))
  Downloading pluggy-1.2.0-py3-none-any.whl (17 kB)
Collecting tornado>=5.0 (from pytest_tornasync->-r requirements.txt (line 3))
  Downloading tornado-6.3.3-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (427 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 427.7/427.7 kB 8.3 MB/s eta 0:00:00
Collecting execnet>=1.1 (from pytest-xdist->-r requirements.txt (line 4))
  Downloading execnet-2.0.2-py3-none-any.whl (37 kB)
Collecting tblib (from pytest-parallel->-r requirements.txt (line 5))
  Downloading tblib-2.0.0-py3-none-any.whl (11 kB)
Collecting makefun>=1.5 (from pytest_steps->-r requirements.txt (line 8))
  Downloading makefun-1.15.1-py2.py3-none-any.whl (22 kB)
Collecting wrapt (from pytest_steps->-r requirements.txt (line 8))
  Downloading wrapt-1.15.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (78 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.9/78.9 kB 15.4 MB/s eta 0:00:00
Installing collected packages: makefun, wrapt, urllib3, tornado, tblib, pluggy, packaging, iniconfig, idna, execnet, configparser, charset-normalizer, certifi, requests, pytest_steps, pytest, pytest-xdist, pytest_tornasync, pytest-stress, pytest-repeat, pytest-parallel
Successfully installed certifi-2023.7.22 charset-normalizer-3.2.0 configparser-6.0.0 execnet-2.0.2 idna-3.4 iniconfig-2.0.0 makefun-1.15.1 packaging-23.1 pluggy-1.2.0 pytest-7.4.0 pytest-parallel-0.1.1 pytest-repeat-0.9.1 pytest-stress-1.0.1 pytest-xdist-3.3.1 pytest_steps-1.8.0 pytest_tornasync-0.6.0.post2 requests-2.31.0 tblib-2.0.0 tornado-6.3.3 urllib3-2.0.4 wrapt-1.15.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

[notice] A new release of pip is available: 23.1.2 -> 23.2.1
[notice] To update, run: pip install --upgrade pip
============================= test session starts ==============================
platform linux -- Python 3.11.4, pytest-7.4.0, pluggy-1.2.0
rootdir: /api-tests
configfile: pyproject.toml
plugins: steps-1.8.0, xdist-3.3.1, tornasync-0.6.0.post2, stress-1.0.1, repeat-0.9.1, parallel-0.1.1

----------------------------- live log collection ------------------------------
2023-08-20 11:34:17 [    INFO] *****Running test suite: TestSuiteInvalid****** (api_tests.py:141)
2023-08-20 11:34:17 [    INFO] Test suite description: Invald test cases (api_tests.py:143)
2023-08-20 11:34:17 [    INFO] Name: TestCase1 (api_tests.py:74)
2023-08-20 11:34:17 [    INFO] Description: Valid natural person (api_tests.py:75)
2023-08-20 11:34:17 [    INFO] Expected result: ExpectedResults.INVALID (api_tests.py:77)
2023-08-20 11:34:17 [    INFO] Target URL: http://lgs:8080/api/v1/sync/partial/person-data (api_tests.py:78)
2023-08-20 11:34:17 [    INFO] Sent dataset. Got TransactionId: ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:85)
2023-08-20 11:34:17 [    INFO] Query transaction log and wait for completion, expecting state [<TransactionStates.FAILED: 3>]... (api_tests.py:86)
2023-08-20 11:34:17 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:17 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:17 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:17 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:17 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:17 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:17 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:17 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:18 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:18 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:18 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:18 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:18 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:18 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:18 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:18 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:18 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:18 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:19 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:19 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:19 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:19 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:19 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:19 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:19 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:19 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:19 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:19 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:20 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:20 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:20 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:20 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:20 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:20 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:20 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:20 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:20 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:20 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:21 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:21 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:21 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:21 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:21 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:21 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:21 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:21 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:22 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:22 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:22 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:22 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:22 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:22 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:22 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:22 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:22 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:22 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:23 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:23 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:23 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:23 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:23 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:23 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
2023-08-20 11:34:23 [    INFO] Target URL: http://lgs:8080/api/v1/sync/transaction/ece94b33-a8d0-4b66-802c-852e871d1d9f (api_tests.py:97)
2023-08-20 11:34:23 [    INFO] {'transactionId': 'ece94b33-a8d0-4b66-802c-852e871d1d9f', 'createdAt': '2023-08-20T11:34:17.270+00:00', 'updatedAt': '2023-08-20T11:34:17.270+00:00', 'state': 'NEW', 'jobId': None} (api_tests.py:101)
collected 0 items / 1 error

==================================== ERRORS ====================================
________________________ ERROR collecting api_tests.py _________________________
/usr/local/lib/python3.11/site-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/usr/local/lib/python3.11/site-packages/_pytest/runner.py:372: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/usr/local/lib/python3.11/site-packages/_pytest/python.py:531: in collect
    self._inject_setup_module_fixture()
/usr/local/lib/python3.11/site-packages/_pytest/python.py:545: in _inject_setup_module_fixture
    self.obj, ("setUpModule", "setup_module")
/usr/local/lib/python3.11/site-packages/_pytest/python.py:310: in obj
    self._obj = obj = self._getobj()
/usr/local/lib/python3.11/site-packages/_pytest/python.py:528: in _getobj
    return self._importtestmodule()
/usr/local/lib/python3.11/site-packages/_pytest/python.py:617: in _importtestmodule
    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
/usr/local/lib/python3.11/site-packages/_pytest/pathlib.py:565: in import_path
    importlib.import_module(module_name)
/usr/local/lib/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1204: in _gcd_import
    ???
<frozen importlib._bootstrap>:1176: in _find_and_load
    ???
<frozen importlib._bootstrap>:1147: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:690: in _load_unlocked
    ???
/usr/local/lib/python3.11/site-packages/_pytest/assertion/rewrite.py:178: in exec_module
    exec(co, module.__dict__)
api_tests.py:158: in <module>
    test_run_all_test_suites()
api_tests.py:155: in test_run_all_test_suites
    run_test_suite(json_data)
api_tests.py:146: in run_test_suite
    transaction_id = send_data_and_validate_case(test_case)
api_tests.py:89: in send_data_and_validate_case
    state = wait_for_completion(transaction_id, expected_state_list)
api_tests.py:134: in wait_for_completion
    assert False, "Did not get expected completion states " + str(
E   AssertionError: Did not get expected completion states [<TransactionStates.FAILED: 3>] but TransactionStates.NEW after 32 retries.
E   assert False
=========================== short test summary info ============================
ERROR api_tests.py - AssertionError: Did not get expected completion states [...
!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 6.85s ===============================

@Ghabi-ISC
Copy link
Contributor

@TobyTheHutt we are currently facing the same problems. We are trying to figure out how these tests were supposed to be executed.
Sorry, it took this long!

@Ghabi-ISC Ghabi-ISC self-assigned this Feb 28, 2024
@Ghabi-ISC Ghabi-ISC added the under investigation The issue is currently under investigation by developers label Feb 28, 2024
@Ghabi-ISC Ghabi-ISC added this to the 2.1.0 milestone Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
under investigation The issue is currently under investigation by developers
Projects
None yet
Development

No branches or pull requests

2 participants