Skip to content

Commit

Permalink
Add refactor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
c-bata committed Oct 14, 2022
1 parent 1ddb202 commit 3e19989
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/storages_tests/test_journal.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def pop_waiting_trial(file_path: str, study_name: str) -> Optional[int]:
return study._pop_waiting_trial_id()


def test_set_trial_state_values_multiprocess_safe() -> None:
def test_pop_waiting_trial_multiprocess_safe() -> None:
with tempfile.NamedTemporaryFile() as file:
file_storage = optuna.storages.JournalFileStorage(file.name)
storage = optuna.storages.JournalStorage(file_storage)
Expand Down
2 changes: 1 addition & 1 deletion tests/study_tests/test_study.py
Original file line number Diff line number Diff line change
Expand Up @@ -1527,7 +1527,7 @@ def objective(trial: Trial) -> float:
@pytest.mark.parametrize("storage_mode", STORAGE_MODES)
def test_pop_waiting_trial_thread_safe(storage_mode: str) -> None:
if "sqlite" == storage_mode or "cached_sqlite" == storage_mode:
pytest.skip("set_trial_state_values is not thread-safe on SQLite3")
pytest.skip("study._pop_waiting_trial is not thread-safe on SQLite3")

num_enqueued = 10
with StorageSupplier(storage_mode) as storage:
Expand Down

0 comments on commit 3e19989

Please sign in to comment.