Skip to content

Commit

Permalink
SNOW-918603: Fix the test failures we commented out recently
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry Xi authored Oct 25, 2023
2 parents 216240a + cadb1a6 commit 1eeb907
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
2 changes: 2 additions & 0 deletions cpp/FileTransferAgent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,14 @@ Snowflake::Client::FileTransferAgent::FileTransferAgent(
m_getFastFail(false)
{
_mutex_init(&m_parallelTokRenewMutex);
_mutex_init(&m_parallelFailedMsgMutex);
}

Snowflake::Client::FileTransferAgent::~FileTransferAgent()
{
reset();
_mutex_term(&m_parallelTokRenewMutex);
_mutex_term(&m_parallelFailedMsgMutex);
}

void Snowflake::Client::FileTransferAgent::reset()
Expand Down
2 changes: 0 additions & 2 deletions tests/test_unit_cred_renew.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,10 +458,8 @@ int main(void) {
cmocka_unit_test(test_token_renew_small_files),
cmocka_unit_test(test_token_renew_large_file),
cmocka_unit_test(test_token_renew_get_remote_meta),
#ifndef __aarch64__
cmocka_unit_test(test_transfer_exception_upload),
cmocka_unit_test(test_transfer_exception_download)
#endif
};
int ret = cmocka_run_group_tests(tests, gr_setup, NULL);
return ret;
Expand Down
16 changes: 0 additions & 16 deletions tests/test_unit_put_fast_fail.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,6 @@ class MockedStorageClient : public Snowflake::Client::IStorageClient

void test_put_fast_fail_core(bool successWithRetry)
{
// sdk issue 340
// temporariy disable this test case on Linux otherwise it would be a blocker
// for changing build environment to centos7. Will get it back when issue 340
// is fixed.
#ifdef __linux__
return;
#endif

std::string matchDir = getTestFileMatchDir();
matchDir += "*.csv";
IStorageClient * client = new MockedStorageClient();
Expand Down Expand Up @@ -299,14 +291,6 @@ void test_put_fast_fail_core(bool successWithRetry)

void test_get_fast_fail_core(bool successWithRetry)
{
// sdk issue 340
// temporariy disable this test case on Linux otherwise it would be a blocker
// for changing build environment to centos7. Will get it back when issue 340
// is fixed.
#ifdef __linux__
return;
#endif

std::string matchDir = getTestFileMatchDir();
IStorageClient * client = new MockedStorageClient();
StorageClientFactory::injectMockedClient(client);
Expand Down

0 comments on commit 1eeb907

Please sign in to comment.