diff --git a/modules/platforms/cpp/tests/client-test/column_order_test.cpp b/modules/platforms/cpp/tests/client-test/column_order_test.cpp index 4fdb033bc80..b0924d01810 100644 --- a/modules/platforms/cpp/tests/client-test/column_order_test.cpp +++ b/modules/platforms/cpp/tests/client-test/column_order_test.cpp @@ -27,7 +27,8 @@ using namespace ignite; -#define TEST_TABLE_NAME "column_order_test" +// TODO https://issues.apache.org/jira/browse/IGNITE-24261 check lowercased name +#define TEST_TABLE_NAME "COLUMN_ORDER_TEST" /** * Test suite. diff --git a/modules/platforms/cpp/tests/client-test/ignite_runner_suite.h b/modules/platforms/cpp/tests/client-test/ignite_runner_suite.h index 2d6611677c2..cca7a641ed1 100644 --- a/modules/platforms/cpp/tests/client-test/ignite_runner_suite.h +++ b/modules/platforms/cpp/tests/client-test/ignite_runner_suite.h @@ -38,9 +38,11 @@ using namespace std::string_view_literals; */ class ignite_runner_suite : public virtual ::testing::Test { public: - static constexpr std::string_view TABLE_1 = "tbl1"sv; - static constexpr std::string_view TABLE_NAME_ALL_COLUMNS = "tbl_all_columns"sv; - static constexpr std::string_view TABLE_NAME_ALL_COLUMNS_SQL = "tbl_all_columns_sql"sv; + // TODO https://issues.apache.org/jira/browse/IGNITE-24261 revert changing named to uppercase + static constexpr std::string_view TABLE_1 = "TBL1"sv; + static constexpr std::string_view TABLE_NAME_ALL_COLUMNS = "TBL_ALL_COLUMNS"sv; + static constexpr std::string_view TABLE_NAME_ALL_COLUMNS_SQL = "TBL_ALL_COLUMNS_SQL"sv; + inline static const std::string PLATFORM_TEST_NODE_RUNNER = "org.apache.ignite.internal.runner.app.PlatformTestNodeRunner"; diff --git a/modules/platforms/cpp/tests/client-test/tables_test.cpp b/modules/platforms/cpp/tests/client-test/tables_test.cpp index 73cf73404de..be7961af9d5 100644 --- a/modules/platforms/cpp/tests/client-test/tables_test.cpp +++ b/modules/platforms/cpp/tests/client-test/tables_test.cpp @@ -28,6 +28,9 @@ using namespace ignite; +// TODO https://issues.apache.org/jira/browse/IGNITE-24261 check lowercased name +#define TEST_TABLE_NAME "TBL1" + /** * Test suite. */ @@ -43,9 +46,9 @@ TEST_F(tables_test, tables_get_table) { auto tableUnknown = tables.get_table("some_unknown"); EXPECT_FALSE(tableUnknown.has_value()); - auto table = tables.get_table("tbl1"); + auto table = tables.get_table(TEST_TABLE_NAME); ASSERT_TRUE(table.has_value()); - EXPECT_EQ(table->get_name(), "tbl1"); + EXPECT_EQ(table->get_name(), TEST_TABLE_NAME); } TEST_F(tables_test, tables_get_table_async_promises) { @@ -66,11 +69,11 @@ TEST_F(tables_test, tables_get_table_async_promises) { EXPECT_FALSE(tableUnknown.has_value()); tablePromise = std::make_shared>>(); - tables.get_table_async("tbl1", result_promise_setter(tablePromise)); + tables.get_table_async(TEST_TABLE_NAME, result_promise_setter(tablePromise)); auto table = tablePromise->get_future().get(); ASSERT_TRUE(table.has_value()); - EXPECT_EQ(table->get_name(), "tbl1"); + EXPECT_EQ(table->get_name(), TEST_TABLE_NAME); } TEST_F(tables_test, tables_get_table_async_callbacks) { @@ -104,7 +107,7 @@ TEST_F(tables_test, tables_get_table_async_callbacks) { operation1->set_value(); }); - tables.get_table_async("tbl1", [&](auto tableRes) { + tables.get_table_async(TEST_TABLE_NAME, [&](auto tableRes) { if (!check_and_set_operation_error(*operation2, tableRes)) return; @@ -113,7 +116,7 @@ TEST_F(tables_test, tables_get_table_async_callbacks) { operation2->set_exception(std::make_exception_ptr(ignite_error("Table should not be null"))); return; } - if (table->get_name() != "tbl1") { + if (table->get_name() != TEST_TABLE_NAME) { operation2->set_exception( std::make_exception_ptr(ignite_error("Table has unexpected name: " + table->get_name()))); return; @@ -140,7 +143,7 @@ TEST_F(tables_test, tables_get_tables) { auto tables = tablesApi.get_tables(); ASSERT_GT(tables.size(), 0); - auto it = std::find_if(tables.begin(), tables.end(), [](auto &table) { return table.get_name() == "TBL1"; }); + auto it = std::find_if(tables.begin(), tables.end(), [](auto &table) { return table.get_name() == TEST_TABLE_NAME; }); ASSERT_NE(it, tables.end()); } @@ -159,7 +162,7 @@ TEST_F(tables_test, tables_get_tables_async_promises) { auto tables = tablesPromise->get_future().get(); ASSERT_GT(tables.size(), 0); - auto it = std::find_if(tables.begin(), tables.end(), [](auto &table) { return table.get_name() == "TBL1"; }); + auto it = std::find_if(tables.begin(), tables.end(), [](auto &table) { return table.get_name() == TEST_TABLE_NAME; }); ASSERT_NE(it, tables.end()); } diff --git a/modules/platforms/cpp/tests/client-test/transactions_test.cpp b/modules/platforms/cpp/tests/client-test/transactions_test.cpp index 7750703cb21..902e20e762c 100644 --- a/modules/platforms/cpp/tests/client-test/transactions_test.cpp +++ b/modules/platforms/cpp/tests/client-test/transactions_test.cpp @@ -27,6 +27,9 @@ using namespace ignite; +// TODO https://issues.apache.org/jira/browse/IGNITE-24261 check lowercased name +#define TEST_TABLE_NAME "TBL1" + /** * Test suite. */ @@ -68,7 +71,7 @@ TEST_F(transactions_test, empty_transaction_commit) { } TEST_F(transactions_test, commit_updates_data) { - auto record_view = m_client.get_tables().get_table("tbl1")->get_record_binary_view(); + auto record_view = m_client.get_tables().get_table(TABLE_1)->get_record_binary_view(); auto tx = m_client.get_transactions().begin(); @@ -86,7 +89,7 @@ TEST_F(transactions_test, commit_updates_data) { } TEST_F(transactions_test, rollback_does_not_update_data) { - auto record_view = m_client.get_tables().get_table("tbl1")->get_record_binary_view(); + auto record_view = m_client.get_tables().get_table(TABLE_1)->get_record_binary_view(); auto tx = m_client.get_transactions().begin(); @@ -102,7 +105,7 @@ TEST_F(transactions_test, rollback_does_not_update_data) { // TODO https://issues.apache.org/jira/browse/IGNITE-22057 TEST_F(transactions_test, DISABLED_destruction_does_not_update_data) { - auto record_view = m_client.get_tables().get_table("tbl1")->get_record_binary_view(); + auto record_view = m_client.get_tables().get_table(TABLE_1)->get_record_binary_view(); { auto tx = m_client.get_transactions().begin(); @@ -117,7 +120,7 @@ TEST_F(transactions_test, DISABLED_destruction_does_not_update_data) { } TEST_F(transactions_test, non_committed_data_visible_for_tx) { - auto record_view = m_client.get_tables().get_table("tbl1")->get_record_binary_view(); + auto record_view = m_client.get_tables().get_table(TABLE_1)->get_record_binary_view(); auto tx = m_client.get_transactions().begin(); @@ -133,7 +136,7 @@ TEST_F(transactions_test, non_committed_data_visible_for_tx) { } TEST_F(transactions_test, sql_commit) { - auto record_view = m_client.get_tables().get_table("tbl1")->get_record_binary_view(); + auto record_view = m_client.get_tables().get_table(TABLE_1)->get_record_binary_view(); auto tx = m_client.get_transactions().begin(); @@ -151,7 +154,7 @@ TEST_F(transactions_test, sql_commit) { } TEST_F(transactions_test, sql_rollback) { - auto record_view = m_client.get_tables().get_table("tbl1")->get_record_binary_view(); + auto record_view = m_client.get_tables().get_table(TABLE_1)->get_record_binary_view(); auto tx = m_client.get_transactions().begin(); @@ -194,7 +197,7 @@ TEST_F(transactions_test, rollback_after_rollback_works) { } TEST_F(transactions_test, record_view_upsert_all) { - auto record_view = m_client.get_tables().get_table("tbl1")->get_record_binary_view(); + auto record_view = m_client.get_tables().get_table(TABLE_1)->get_record_binary_view(); auto tx = m_client.get_transactions().begin(); @@ -217,7 +220,7 @@ TEST_F(transactions_test, record_view_upsert_all) { } TEST_F(transactions_test, record_view_get_and_upsert) { - auto record_view = m_client.get_tables().get_table("tbl1")->get_record_binary_view(); + auto record_view = m_client.get_tables().get_table(TABLE_1)->get_record_binary_view(); auto tx = m_client.get_transactions().begin(); @@ -241,7 +244,7 @@ TEST_F(transactions_test, record_view_get_and_upsert) { } TEST_F(transactions_test, record_view_insert) { - auto record_view = m_client.get_tables().get_table("tbl1")->get_record_binary_view(); + auto record_view = m_client.get_tables().get_table(TABLE_1)->get_record_binary_view(); auto tx = m_client.get_transactions().begin(); @@ -263,7 +266,7 @@ TEST_F(transactions_test, record_view_insert) { } TEST_F(transactions_test, record_view_insert_all) { - auto record_view = m_client.get_tables().get_table("tbl1")->get_record_binary_view(); + auto record_view = m_client.get_tables().get_table(TABLE_1)->get_record_binary_view(); auto tx = m_client.get_transactions().begin(); @@ -286,7 +289,7 @@ TEST_F(transactions_test, record_view_insert_all) { } TEST_F(transactions_test, record_view_replace) { - auto record_view = m_client.get_tables().get_table("tbl1")->get_record_binary_view(); + auto record_view = m_client.get_tables().get_table(TABLE_1)->get_record_binary_view(); auto tx = m_client.get_transactions().begin(); @@ -305,7 +308,7 @@ TEST_F(transactions_test, record_view_replace) { } TEST_F(transactions_test, record_view_replace_exact) { - auto record_view = m_client.get_tables().get_table("tbl1")->get_record_binary_view(); + auto record_view = m_client.get_tables().get_table(TABLE_1)->get_record_binary_view(); auto tx = m_client.get_transactions().begin(); @@ -324,7 +327,7 @@ TEST_F(transactions_test, record_view_replace_exact) { } TEST_F(transactions_test, record_view_get_and_replace) { - auto record_view = m_client.get_tables().get_table("tbl1")->get_record_binary_view(); + auto record_view = m_client.get_tables().get_table(TABLE_1)->get_record_binary_view(); auto tx = m_client.get_transactions().begin(); @@ -346,7 +349,7 @@ TEST_F(transactions_test, record_view_get_and_replace) { } TEST_F(transactions_test, record_view_remove) { - auto record_view = m_client.get_tables().get_table("tbl1")->get_record_binary_view(); + auto record_view = m_client.get_tables().get_table(TABLE_1)->get_record_binary_view(); auto value0 = get_tuple(42, "Lorem ipsum"); record_view.insert(nullptr, value0); @@ -362,7 +365,7 @@ TEST_F(transactions_test, record_view_remove) { } TEST_F(transactions_test, record_view_remove_exact) { - auto record_view = m_client.get_tables().get_table("tbl1")->get_record_binary_view(); + auto record_view = m_client.get_tables().get_table(TABLE_1)->get_record_binary_view(); auto value0 = get_tuple(42, "Lorem ipsum"); record_view.insert(nullptr, value0); @@ -378,7 +381,7 @@ TEST_F(transactions_test, record_view_remove_exact) { } TEST_F(transactions_test, record_view_get_and_remove) { - auto record_view = m_client.get_tables().get_table("tbl1")->get_record_binary_view(); + auto record_view = m_client.get_tables().get_table(TABLE_1)->get_record_binary_view(); auto value0 = get_tuple(42, "Lorem ipsum"); record_view.insert(nullptr, value0); @@ -402,7 +405,7 @@ TEST_F(transactions_test, record_view_get_and_remove) { } TEST_F(transactions_test, record_view_remove_all) { - auto record_view = m_client.get_tables().get_table("tbl1")->get_record_binary_view(); + auto record_view = m_client.get_tables().get_table(TABLE_1)->get_record_binary_view(); auto value0 = get_tuple(42, "Lorem ipsum"); record_view.insert(nullptr, value0); @@ -418,7 +421,7 @@ TEST_F(transactions_test, record_view_remove_all) { } TEST_F(transactions_test, record_view_remove_all_exact) { - auto record_view = m_client.get_tables().get_table("tbl1")->get_record_binary_view(); + auto record_view = m_client.get_tables().get_table(TABLE_1)->get_record_binary_view(); auto value0 = get_tuple(42, "Lorem ipsum"); record_view.insert(nullptr, value0); diff --git a/modules/platforms/cpp/tests/odbc-test/odbc_suite.h b/modules/platforms/cpp/tests/odbc-test/odbc_suite.h index 11015c99b54..e94c2323ed3 100644 --- a/modules/platforms/cpp/tests/odbc-test/odbc_suite.h +++ b/modules/platforms/cpp/tests/odbc-test/odbc_suite.h @@ -43,9 +43,10 @@ namespace ignite { */ class odbc_suite : public virtual ::testing::Test, public odbc_connection { public: - static inline const std::string TABLE_1 = "tbl1"; - static inline const std::string TABLE_NAME_ALL_COLUMNS = "tbl_all_columns"; - static inline const std::string TABLE_NAME_ALL_COLUMNS_SQL = "tbl_all_columns_sql"; + // TODO https://issues.apache.org/jira/browse/IGNITE-24261 revert changing named to uppercase + static inline const std::string TABLE_1 = "TBL1"; + static inline const std::string TABLE_NAME_ALL_COLUMNS = "TBL_ALL_COLUMNS"; + static inline const std::string TABLE_NAME_ALL_COLUMNS_SQL = "TBL_ALL_COLUMNS_SQL"; static constexpr const char *KEY_COLUMN = "key"; static constexpr const char *VAL_COLUMN = "val";