Skip to content

Commit

Permalink
[AD-638] temporarily remove test results
Browse files Browse the repository at this point in the history
  • Loading branch information
alinaliBQ committed Mar 14, 2022
1 parent f6759dc commit 9438c45
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
23 changes: 12 additions & 11 deletions src/odbc-test/src/odbc_test_suite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ using namespace boost::unit_test;
/**
* Test setup config for test results
*/
struct OdbcConfig {
OdbcConfig() : test_log("odbc_test_result.xml") {
unit_test_log.set_stream(test_log);
unit_test_log.set_format(OF_JUNIT);
}
~OdbcConfig() {
unit_test_log.set_stream(std::cout);
}
// struct OdbcConfig {
// OdbcConfig() : test_log("odbc_test_result.xml") {
// unit_test_log.set_stream(test_log);
// unit_test_log.set_format(OF_JUNIT);
// }
// ~OdbcConfig() {
// unit_test_log.set_stream(std::cout);
// }

std::ofstream test_log;
};
// std::ofstream test_log;
// };

BOOST_GLOBAL_FIXTURE(OdbcConfig);
// BOOST_GLOBAL_FIXTURE(OdbcConfig);

namespace ignite {
namespace odbc {
Expand Down Expand Up @@ -110,6 +110,7 @@ void OdbcTestSuite::Connect(const std::string& connectStr) {
SQLDriverConnect(dbc, NULL, &connectStr0[0],
static_cast< SQLSMALLINT >(connectStr0.size()), outstr,
sizeof(outstr), &outstrlen, SQL_DRIVER_COMPLETE);
// SQLRETURN ret = -1;

if (!SQL_SUCCEEDED(ret))
BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_DBC, dbc));
Expand Down
12 changes: 6 additions & 6 deletions src/odbc/src/jni/documentdb_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ namespace jni {
JniErrorCode DocumentDbConnection::Open(const Configuration& config,
JniErrorInfo& errInfo) {
bool connected = false;
std::cout << "Open - line 33 pass\n"; // if (!_jniContext.IsValid()) { std::cout << "Open - line 35 pass\n";
if (true) { std::cout << "Open - line 35 pass\n";
std::cout << "Open - line 33 pass\n"; // std::cout << "_jniContext ptr: %p \n" << _jniContext.ptr; std::cout << "_jniContext ptr.jvm: %p \n" << _jniContext.ptr.jvm;
if (!_jniContext.IsValid()) { std::cout << "Open - line 35 pass\n"; // if (true) { std::cout << "Open - line 35 pass\n"; // if (false) {
errInfo.errMsg = new char[]{"Unable to get initialized JVM."};
errInfo.code = JniErrorCode::IGNITE_JNI_ERR_JVM_INIT; std::cout << "Open - line 37 pass\n";
return errInfo.code;
}
}
if (_connection.IsValid()) { std::cout << "Open - line 40 pass\n";
return JniErrorCode::IGNITE_JNI_ERR_SUCCESS;
}

std::cout << "Open - line 43 pass\n";
std::string connectionString = config.ToJdbcConnectionString();

SharedPointer< GlobalJObject > result;
std::cout << "Open - line 44 pass\n";
SharedPointer< GlobalJObject > result; std::cout << "Open - line 46 pass\n";
JniErrorCode success = _jniContext.Get()->DriverManagerGetConnection(
connectionString.c_str(), result, errInfo); std::cout << "Open - line 47 pass\n";
connected = (success == JniErrorCode::IGNITE_JNI_ERR_SUCCESS);
Expand Down
4 changes: 2 additions & 2 deletions src/odbc/src/log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ void Logger::WriteMessage(std::string const& message) {
}

Logger* Logger::Get() {
const char* envVarName = "IGNITE_ODBC_LOG_PATH"; std::cout << "Get - line 60 pass\n";
static Logger logger(getenv(envVarName)); std::cout << "Get - line 61 pass\n";
const char* envVarName = "IGNITE_ODBC_LOG_PATH";
static Logger logger(getenv(envVarName)); std::cout << "Logger Get - line 61 pass\n";
return logger.IsEnabled() ? &logger : 0; // -AL-: this could cause segfault because 0 could be returned.
}
} // namespace odbc
Expand Down

0 comments on commit 9438c45

Please sign in to comment.