Hello,
I have some Python tests. Each test starts 3 separate threads:
1. Runs flask thread on port 500 (source API)
2. Runs Another flask thread on port 501 (destination API)
3. Third thread - starts a Python application (start "python main.py parameters" process), gathers data from source API, and writes to destination API.
After all 3 started, the test waits for a certain time/events and validates that the destination API received the correct data.
When I run tests (in any sequence) on my computer Windows, all tests, consistently pass. All ports are closed, and threads are exited.
If I run any single test on the BB pipeline - it consistently passes.
PROBLEM: If I run more than 1 test on BB pipeline, the first always passes, and the second - always fails. The fail - is that Destination API never receives the API calls from the main application. However, I do see that the calls are made, and the process acknowledges it.
Questions:
1. Is there any problem with closing/shutting down listening on ports from Python? Maybe a delayed port release?
2. Is it possible that more than 1 process listens on the same port in
3. Any other ideas, of how it's possible?
OK, figured it out: the failure in cleanup (shutting down sub process on bitbucket BB/Linux).
The 3rd process fails to exit from the first test run.
So when the 2nd test runs, it starts the 2nd "python main.py" process. And the log messages I see that write to destination API - is from the leftover process.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.