diff --git a/services/tunnelbroker/src/Database/DatabaseManager.cpp b/services/tunnelbroker/src/Database/DatabaseManager.cpp --- a/services/tunnelbroker/src/Database/DatabaseManager.cpp +++ b/services/tunnelbroker/src/Database/DatabaseManager.cpp @@ -184,7 +184,7 @@ writeRequests.push_back(writeRequest); } this->innerBatchWriteItem( - MESSAGES_TABLE_NAME, + messageItems[0].getTableName(), DYNAMODB_MAX_BATCH_ITEMS, DYNAMODB_BACKOFF_FIRST_RETRY_DELAY, DYNAMODB_MAX_BACKOFF_TIME, @@ -258,7 +258,7 @@ writeRequests.push_back(currentWriteRequest); } this->innerBatchWriteItem( - MESSAGES_TABLE_NAME, + MessageItem().getTableName(), DYNAMODB_MAX_BATCH_ITEMS, DYNAMODB_BACKOFF_FIRST_RETRY_DELAY, DYNAMODB_MAX_BACKOFF_TIME, diff --git a/services/tunnelbroker/test/DatabaseManagerTest.cpp b/services/tunnelbroker/test/DatabaseManagerTest.cpp --- a/services/tunnelbroker/test/DatabaseManagerTest.cpp +++ b/services/tunnelbroker/test/DatabaseManagerTest.cpp @@ -118,7 +118,7 @@ } EXPECT_EQ( database::DatabaseManager::getInstance().isTableAvailable( - MESSAGES_TABLE_NAME), + messageItems[0].getTableName()), true); database::DatabaseManager::getInstance().putMessageItemsByBatch(messageItems); std::vector> foundItems =