You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since PR #1060 there is a need for the OriginalFile table to be populated for all testing modules which create projects, samples and libraries. Currently, these modules are test_loader and test_create_portal_metadata.
In the above mentioned PR, there was an attempt to run the sync_original_files command at the beginning of each test suite, calling this command either in the setUpClass or setUpTestData methods. This did not work because the unittest test class that we inherit from is TransactionTestCase, which truncates tables at the end of each test.
We are not able to use TestCase, which rolls back transactions from a specific test to the state of the db before the test ran, because it does not support multithreaded connections to a test DB, which we need for our current local implementation of computed file generation. TransactionTestCase does support multiple concurrent connections to the test db, which is why it was chosen for these test classes in the first place.
Currently we're calling sync_original_files in the setUp function, which runs at the beginning of each individual test, which is ultimately wasteful. We'd like to find a way to both call sync_original_files once while also supporting multithreaded db connections.
The text was updated successfully, but these errors were encountered:
Context
Since PR #1060 there is a need for the OriginalFile table to be populated for all testing modules which create projects, samples and libraries. Currently, these modules are
test_loader
andtest_create_portal_metadata
.In the above mentioned PR, there was an attempt to run the
sync_original_files
command at the beginning of each test suite, calling this command either in thesetUpClass
orsetUpTestData
methods. This did not work because theunittest
test class that we inherit from isTransactionTestCase
, which truncates tables at the end of each test.We are not able to use
TestCase
, which rolls back transactions from a specific test to the state of the db before the test ran, because it does not support multithreaded connections to a test DB, which we need for our current local implementation of computed file generation.TransactionTestCase
does support multiple concurrent connections to the test db, which is why it was chosen for these test classes in the first place.Currently we're calling
sync_original_files
in thesetUp
function, which runs at the beginning of each individual test, which is ultimately wasteful. We'd like to find a way to both callsync_original_files
once while also supporting multithreaded db connections.The text was updated successfully, but these errors were encountered: