@@ -1617,23 +1617,16 @@ TEST(ConnectionTest, CheckTraceLogFileExist) {
16171617#ifdef _WIN32
16181618 log_path = " C:\\ b" ;
16191619 log_file = log_path + " \\ odbcdriverforbigquery_0.log" ;
1620- auto conn_str =
1621- kDefaultConnectionString + " ;LogPath=" + log_path + " ;LogLevel=3" ;
1622- #elif defined(__APPLE__)
1623- log_path = " /tmp" ;
1624- log_file = log_path + " /odbcdriverforbigquery_0.log" ;
1625- auto conn_str =
1626- kDefaultConnectionString + " ;LogPath=" + log_path + " ;LogLevel=3" ;
1620+ auto odbc_ini_path =k_trace_reg_path;
16271621#else
16281622 log_path = " /tmp" ;
16291623 log_file = log_path + " /odbcdriverforbigquery_0.log" ;
1630-
16311624 auto odbc_ini = google::cloud::internal::GetEnv (" GOOGLEBIGQUERYODBCINI" );
16321625 auto odbc_ini_path = odbc_ini.value_or (" " );
1633- UpdateTraceConfig (odbc_ini_path, log_path, " 3" );
1626+ #endif /* _WIN32 */
1627+
16341628 auto const & conn_str = kDefaultConnectionString ;
1635- #endif /* _WIN32 */
1636-
1629+ UpdateTraceConfig (odbc_ini_path, log_path, " 3" );
16371630 // Remove existing file
16381631 if (std::filesystem::exists (log_file)) {
16391632 std::filesystem::remove (std::filesystem::path (log_file));
@@ -1661,10 +1654,8 @@ TEST(ConnectionTest, CheckTraceLogFileExist) {
16611654 content.find (" SQLFreeHandle:: DBC handle is free" ) != std::string::npos;
16621655 EXPECT_TRUE (contains_text);
16631656
1664- #if defined(__linux__)
16651657 // Disable tracing for non windows
16661658 UpdateTraceConfig (odbc_ini_path, log_path, " 0" );
1667- #endif /* defined(__linux__) */
16681659}
16691660
16701661#endif // BQ_DRIVER_INTEGRATION_TESTS
0 commit comments