Skip to content

Commit fb50d01

Browse files
committed
Update the unit test's comments with pointers to the relevant issues
1 parent 5ac6354 commit fb50d01

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

tests/test_manager.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,13 @@ def test_db_journal_mode(any_fid_manager_class, fid_db_path, jp_root_dir, db_jou
621621
assert actual_journal_mode[0].upper() == expected_journal_mode
622622

623623

624-
624+
# This test demonstrates an issue raised in
625+
# https://github.com/jupyter-server/jupyter_server_fileid/pull/76
626+
# which was later fixed in
627+
# https://github.com/jupyter-server/jupyter_server_fileid/pull/77
628+
#
629+
# We use this unit test to catch this edge case and ensure
630+
# its covered going forward.
625631
def test_multiple_fileIdManager_connections_after_exception(fid_db_path):
626632
original_file_path = "/path/to/file"
627633
copy_location = "/path/to/copy"
@@ -641,9 +647,12 @@ def test_multiple_fileIdManager_connections_after_exception(fid_db_path):
641647
except sqlite3.IntegrityError:
642648
pass
643649

644-
# Now the database is locked and no other connections can be made.
645-
# Start a second connection to the database and demonstrate
646-
# that the database is now stuck in a locked state.
650+
# Previously, these actions locked the database for future connections.
651+
# This was fixed in: https://github.com/jupyter-server/jupyter_server_fileid/pull/77
652+
653+
# Try making a second connection that writes to the DB and
654+
# make sure no exceptions were raised.
647655
manager_2 = ArbitraryFileIdManager(db_path=fid_db_path)
648656
manager_2.copy(original_file_path, another_copy_location)
649657

658+

0 commit comments

Comments
 (0)