Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix BMQstoragetool-related enterprise CI fails #253

Merged
merged 2 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ static void test1_breathingTest()
fileManager,
bsl::cout,
s_allocator_p);
ASSERT_NE(dynamic_cast<JournalFileProcessor*>(cmdProcessor.get()),
bsl::nullptr_t());
ASSERT(dynamic_cast<JournalFileProcessor*>(cmdProcessor.get()) != 0);
}

// ============================================================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,8 @@ static void test8_searchMessagesByQueueKeyTest()
queueKey2);

// Configure parameters to search messages by queueKey1
Parameters params(s_allocator_p);
bsl::vector<bsl::string> queueKeys(1, queueKey1, s_allocator_p);
params.d_queueKey = bsl::move(queueKeys);
Parameters params(s_allocator_p);
params.d_queueKey.push_back(queueKey1);
// Prepare file manager
bslma::ManagedPtr<FileManager> fileManager(
new (*s_allocator_p) FileManagerMock(journalFile, s_allocator_p),
Expand Down Expand Up @@ -652,9 +651,7 @@ static void test10_searchMessagesByQueueNameAndQueueKeyTest()
Parameters params(s_allocator_p);
params.d_queueName.push_back("queue1");
params.d_queueMap.insert(queueInfo);

bsl::vector<bsl::string> queueKeys(1, queueKey2, s_allocator_p);
params.d_queueKey = bsl::move(queueKeys);
params.d_queueKey.push_back(queueKey2);

// Prepare file manager
bslma::ManagedPtr<FileManager> fileManager(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ static void test1_breathingTest()
fileManager,
bsl::cout,
s_allocator_p);
ASSERT_NE(dynamic_cast<SearchResult*>(searchResult.get()),
bsl::nullptr_t());
ASSERT(dynamic_cast<SearchResult*>(searchResult.get()) != 0);
}

// ============================================================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ class FileManagerMock : public FileManager {

mqbs::JournalFileIterator d_journalFileIt;
// Journal file iterator.
mqbs::DataFileIterator d_dataFileIt;
// Data file iterator.

public:
// CREATORS
Expand All @@ -234,7 +236,7 @@ class FileManagerMock : public FileManager {
explicit FileManagerMock(bslma::Allocator* allocator = 0)
{
EXPECT_CALL(*this, dataFileIterator())
.WillRepeatedly(Return(bsl::nullptr_t()));
.WillRepeatedly(Return(&d_dataFileIt));
}

/// Constructor using the specified `journalFile` and `allocator`.
Expand All @@ -245,7 +247,7 @@ class FileManagerMock : public FileManager {
false)
{
EXPECT_CALL(*this, dataFileIterator())
.WillRepeatedly(Return(bsl::nullptr_t()));
.WillRepeatedly(Return(&d_dataFileIt));
}

// MANIPULATORS
Expand Down
Loading