-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Feature - Reset threading lock at conftest #901
Closed
Closed
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
63179fc
fix: reset threading lock at conftest
trgiangdo 8aa5e7f
fix: remove redundant function and lock in test_job_manager.py
trgiangdo a345c6d
fix: minor code clean up
trgiangdo ab5ec5a
fix: reset everything after each test as well
trgiangdo c48b1f0
fix: temporarily deactiavte _GCDoNotUpdate base class
trgiangdo fcbb36b
fix: revert the stop wait dispatcher that has been removed by accident
trgiangdo bb3f383
add logs on lock acquire and release
trgiangdo 9a20741
temporarily remove join dispatcher thread
trgiangdo 11500a3
fix: remove lock log
trgiangdo f157015
Merge branch 'develop' into feature/reset-threading-lock-at-conftest
trgiangdo 29c42c7
fix: remove jobs_to_run log
trgiangdo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
import shutil | ||
from datetime import datetime | ||
from queue import Queue | ||
from threading import Lock | ||
from unittest.mock import patch | ||
|
||
import pandas as pd | ||
|
@@ -180,14 +181,9 @@ def default_multi_sheet_data_frame(): | |
def cleanup_files(): | ||
yield | ||
|
||
if os.path.exists(".data"): | ||
shutil.rmtree(".data", ignore_errors=True) | ||
if os.path.exists("user_data"): | ||
shutil.rmtree("user_data", ignore_errors=True) | ||
if os.path.exists(".taipy"): | ||
shutil.rmtree(".taipy", ignore_errors=True) | ||
if os.path.exists(".my_data"): | ||
shutil.rmtree(".my_data", ignore_errors=True) | ||
for path in [".data", ".my_data", "user_data", ".taipy"]: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
if os.path.exists(path): | ||
shutil.rmtree(path, ignore_errors=True) | ||
|
||
|
||
@pytest.fixture(scope="function") | ||
|
@@ -331,6 +327,12 @@ def clean_repository(init_config, init_managers, init_orchestrator, init_notifie | |
with patch("sys.argv", ["prog"]): | ||
yield | ||
|
||
close_all_sessions() | ||
init_orchestrator() | ||
init_managers() | ||
init_config() | ||
init_notifier() | ||
|
||
|
||
@pytest.fixture | ||
def init_config(reset_configuration_singleton, inject_core_sections): | ||
|
@@ -378,6 +380,7 @@ def _init_orchestrator(): | |
_OrchestratorFactory._build_dispatcher(force_restart=True) | ||
_OrchestratorFactory._orchestrator.jobs_to_run = Queue() | ||
_OrchestratorFactory._orchestrator.blocked_jobs = [] | ||
_OrchestratorFactory._orchestrator.lock = Lock() | ||
|
||
return _init_orchestrator | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍