Skip to content

Commit ead02ce

Browse files
committed
Remove test that is no longer relevant
1 parent a341d17 commit ead02ce

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

tests/test_manager.py

-39
Original file line numberDiff line numberDiff line change
@@ -618,42 +618,3 @@ def test_db_journal_mode(any_fid_manager_class, fid_db_path, jp_root_dir, db_jou
618618
cursor = fid_manager.con.execute("PRAGMA journal_mode")
619619
actual_journal_mode = cursor.fetchone()
620620
assert actual_journal_mode[0].upper() == expected_journal_mode
621-
622-
623-
# This test demonstrates an issue raised in
624-
# https://github.com/jupyter-server/jupyter_server_fileid/pull/76
625-
# which was later fixed in
626-
# https://github.com/jupyter-server/jupyter_server_fileid/pull/77
627-
#
628-
# We use this unit test to catch this edge case and ensure
629-
# its covered going forward.
630-
def test_multiple_fileIdManager_connections_after_exception(fid_db_path):
631-
original_file_path = "/path/to/file"
632-
copy_location = "/path/to/copy"
633-
another_copy_location = "/path/to/other"
634-
635-
# Setup an initial file ID manager connected to a sqlite database.
636-
manager_1 = ArbitraryFileIdManager(db_path=fid_db_path)
637-
638-
# Create an initial ID for this file
639-
manager_1.index(original_file_path)
640-
# Copy the file
641-
manager_1.copy(original_file_path, copy_location)
642-
# Try copying the file again.
643-
excepted = False
644-
try:
645-
manager_1.copy(original_file_path, copy_location)
646-
# We expect this to fail because the file is already in the database.
647-
except sqlite3.IntegrityError:
648-
excepted = True
649-
pass
650-
651-
assert excepted, "Copying to the same location should raise an exception, but it did not here."
652-
653-
# Previously, these actions locked the database for future connections.
654-
# This was fixed in: https://github.com/jupyter-server/jupyter_server_fileid/pull/77
655-
656-
# Try making a second connection that writes to the DB and
657-
# make sure no exceptions were raised.
658-
manager_2 = ArbitraryFileIdManager(db_path=fid_db_path)
659-
manager_2.copy(original_file_path, another_copy_location)

0 commit comments

Comments
 (0)