Skip to content
Open
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
3 changes: 0 additions & 3 deletions src/applications/bmqtool/bmqtool.m.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,6 @@ int main(int argc, const char* argv[])
// Make TimeUtil thread-safe by calling initialize
bsls::TimeUtil::initialize();

// Prepare the UriParser regexp
bmqt::UriParser::initialize();
Copy link
Collaborator Author

@678098 678098 Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that there was no shutdown in bmqtool.
Also, there were no initialize/shutdown in our tutorial clients.


// Test allocator
balst::StackTraceTestAllocator stta;
stta.setFailureHandler(&stta.failNoop);
Expand Down
4 changes: 0 additions & 4 deletions src/groups/bmq/bmqa/bmqa_closequeuestatus.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,6 @@ int main(int argc, char* argv[])
{
TEST_PROLOG(bmqtst::TestHelper::e_DEFAULT);

bmqt::UriParser::initialize(bmqtst::TestHelperUtil::allocator());

switch (_testCase) {
case 0:
case 3: test3_print(); break;
Expand All @@ -282,7 +280,5 @@ int main(int argc, char* argv[])
} break;
}

bmqt::UriParser::shutdown();

TEST_EPILOG(bmqtst::TestHelper::e_CHECK_DEF_GBL_ALLOC);
}
4 changes: 0 additions & 4 deletions src/groups/bmq/bmqa/bmqa_configurequeuestatus.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,6 @@ int main(int argc, char* argv[])
{
TEST_PROLOG(bmqtst::TestHelper::e_DEFAULT);

bmqt::UriParser::initialize(bmqtst::TestHelperUtil::allocator());

switch (_testCase) {
case 0:
case 3: test3_print(); break;
Expand All @@ -284,7 +282,5 @@ int main(int argc, char* argv[])
} break;
}

bmqt::UriParser::shutdown();

TEST_EPILOG(bmqtst::TestHelper::e_CHECK_DEF_GBL_ALLOC);
}
2 changes: 0 additions & 2 deletions src/groups/bmq/bmqa/bmqa_mocksession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,6 @@ void MockSession::initialize(bslma::Allocator* allocator)

bmqsys::Time::initialize(g_alloc_p);
bmqp::ProtocolUtil::initialize(g_alloc_p);
bmqt::UriParser::initialize(g_alloc_p);

g_bufferFactory_p = new (*g_alloc_p)
bdlbb::PooledBlobBufferFactory(1024, g_alloc_p);
Expand All @@ -653,7 +652,6 @@ void MockSession::shutdown()
return; // RETURN
}

bmqt::UriParser::shutdown();
bmqp::ProtocolUtil::shutdown();
bmqsys::Time::shutdown();
g_alloc_p->deleteObject(g_bufferFactory_p);
Expand Down
4 changes: 0 additions & 4 deletions src/groups/bmq/bmqa/bmqa_mocksession.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1433,8 +1433,6 @@ int main(int argc, char* argv[])
{
TEST_PROLOG(bmqtst::TestHelper::e_DEFAULT);

bmqt::UriParser::initialize(bmqtst::TestHelperUtil::allocator());

switch (_testCase) {
case 0:
case 8: test8_postBlockedToSuspendedQueue(); break;
Expand All @@ -1451,7 +1449,5 @@ int main(int argc, char* argv[])
} break;
}

bmqt::UriParser::shutdown();

TEST_EPILOG(bmqtst::TestHelper::e_DEFAULT);
}
4 changes: 0 additions & 4 deletions src/groups/bmq/bmqa/bmqa_openqueuestatus.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,6 @@ int main(int argc, char* argv[])
{
TEST_PROLOG(bmqtst::TestHelper::e_DEFAULT);

bmqt::UriParser::initialize(bmqtst::TestHelperUtil::allocator());

switch (_testCase) {
case 0:
case 3: test3_print(); break;
Expand All @@ -283,7 +281,5 @@ int main(int argc, char* argv[])
} break;
}

bmqt::UriParser::shutdown();

TEST_EPILOG(bmqtst::TestHelper::e_CHECK_DEF_GBL_ALLOC);
}
5 changes: 1 addition & 4 deletions src/groups/bmq/bmqimp/bmqimp_application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -659,9 +659,7 @@ Application::Application(
bmqsys::Time::initialize();
}

// UriParser and ProtocolUtil initialization/shutdown are thread-safe and
// refcounted
bmqt::UriParser::initialize();
// ProtocolUtil initialization/shutdown is thread-safe and refcounted
bmqp::ProtocolUtil::initialize();

// Start the EventScheduler. We do this here in constructor and not in
Expand Down Expand Up @@ -718,7 +716,6 @@ Application::~Application()

// ProtocolUtil::shutdown is thread-safe and ref-counted
bmqp::ProtocolUtil::shutdown();
bmqt::UriParser::shutdown();
}

int Application::start(const bsls::TimeInterval& timeout)
Expand Down
2 changes: 0 additions & 2 deletions src/groups/bmq/bmqimp/bmqimp_application.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,6 @@ int main(int argc, char* argv[])
}

TEST_EPILOG(bmqtst::TestHelper::e_DEFAULT);
// Global: The global allocator is used to initialize the
// bmqt::URIParser RegEx.
// Default: EventQueue uses bmqc::MonitoredFixedQueue, which uses
// 'bdlcc::SharedObjectPool' which uses bslmt::Semaphore which
// generates a unique name using an ostringstream, hence the
Expand Down
6 changes: 1 addition & 5 deletions src/groups/bmq/bmqimp/bmqimp_brokersession.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10211,7 +10211,6 @@ int main(int argc, char* argv[])
TEST_PROLOG(bmqtst::TestHelper::e_DEFAULT);

bmqsys::Time::initialize();
bmqt::UriParser::initialize(bmqtst::TestHelperUtil::allocator());
bmqp::ProtocolUtil::initialize(bmqtst::TestHelperUtil::allocator());

switch (_testCase) {
Expand Down Expand Up @@ -10293,12 +10292,9 @@ int main(int argc, char* argv[])
}

bmqsys::Time::shutdown();
bmqt::UriParser::shutdown();
bmqp::ProtocolUtil::shutdown();

TEST_EPILOG(bmqtst::TestHelper::e_DEFAULT);
// Global: The global allocator is used to initialize the
// bmqt::URIParser RegEx.
TEST_EPILOG(bmqtst::TestHelper::e_CHECK_GBL_ALLOC);
// Default: EventQueue uses bmqc::MonitoredFixedQueue, which uses
// 'bdlcc::SharedObjectPool' which uses bslmt::Semaphore which
// generates a unique name using an ostringstream, hence the
Expand Down
2 changes: 0 additions & 2 deletions src/groups/bmq/bmqimp/bmqimp_event.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1620,7 +1620,6 @@ int main(int argc, char* argv[])
{
TEST_PROLOG(bmqtst::TestHelper::e_DEFAULT);
bmqp::ProtocolUtil::initialize(bmqtst::TestHelperUtil::allocator());
bmqt::UriParser::initialize(bmqtst::TestHelperUtil::allocator());

switch (_testCase) {
case 0:
Expand All @@ -1642,7 +1641,6 @@ int main(int argc, char* argv[])
} break;
}

bmqt::UriParser::shutdown();
bmqp::ProtocolUtil::shutdown();

TEST_EPILOG(bmqtst::TestHelper::e_CHECK_DEF_GBL_ALLOC);
Expand Down
2 changes: 0 additions & 2 deletions src/groups/bmq/bmqimp/bmqimp_eventqueue.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,6 @@ int main(int argc, char* argv[])
TEST_PROLOG(bmqtst::TestHelper::e_DEFAULT);

bmqsys::Time::initialize();
bmqt::UriParser::initialize(bmqtst::TestHelperUtil::allocator());

switch (_testCase) {
case 0:
Expand All @@ -772,7 +771,6 @@ int main(int argc, char* argv[])
} break;
}

bmqt::UriParser::shutdown();
bmqsys::Time::shutdown();

TEST_EPILOG(bmqtst::TestHelper::e_CHECK_GBL_ALLOC);
Expand Down
7 changes: 1 addition & 6 deletions src/groups/bmq/bmqimp/bmqimp_messagedumper.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1921,7 +1921,6 @@ int main(int argc, char** argv)
TEST_PROLOG(bmqtst::TestHelper::e_DEFAULT);

bmqp::ProtocolUtil::initialize(bmqtst::TestHelperUtil::allocator());
bmqt::UriParser::initialize(bmqtst::TestHelperUtil::allocator());

switch (_testCase) {
case 0:
Expand All @@ -1940,11 +1939,7 @@ int main(int argc, char** argv)
} break;
}

bmqt::UriParser::shutdown();
bmqp::ProtocolUtil::shutdown();

TEST_EPILOG(bmqtst::TestHelper::e_DEFAULT);
// For an unidentified reason, 'e_CHECK_DEF_GBL_ALLOC' fails as a
// result of initializing 'bmqsys::Time' in the constructor of
// 'Tester'.
TEST_EPILOG(bmqtst::TestHelper::e_CHECK_DEF_GBL_ALLOC);
}
4 changes: 0 additions & 4 deletions src/groups/bmq/bmqimp/bmqimp_queue.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,6 @@ int main(int argc, char* argv[])
{
TEST_PROLOG(bmqtst::TestHelper::e_DEFAULT);

bmqt::UriParser::initialize(bmqtst::TestHelperUtil::allocator());

switch (_testCase) {
case 0:
case 6: test6_statTest(); break;
Expand All @@ -538,7 +536,5 @@ int main(int argc, char* argv[])
} break;
}

bmqt::UriParser::shutdown();

TEST_EPILOG(bmqtst::TestHelper::e_CHECK_DEF_GBL_ALLOC);
}
2 changes: 0 additions & 2 deletions src/groups/bmq/bmqimp/bmqimp_queuemanager.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,6 @@ int main(int argc, char* argv[])
TEST_PROLOG(bmqtst::TestHelper::e_DEFAULT);

bmqp::ProtocolUtil::initialize(bmqtst::TestHelperUtil::allocator());
bmqt::UriParser::initialize(bmqtst::TestHelperUtil::allocator());

switch (_testCase) {
case 0:
Expand All @@ -807,7 +806,6 @@ int main(int argc, char* argv[])
} break;
}

bmqt::UriParser::shutdown();
bmqp::ProtocolUtil::shutdown();

TEST_EPILOG(bmqtst::TestHelper::e_CHECK_GBL_ALLOC);
Expand Down
4 changes: 0 additions & 4 deletions src/groups/bmq/bmqp/bmqp_queueutil.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,6 @@ int main(int argc, char* argv[])
{
TEST_PROLOG(bmqtst::TestHelper::e_DEFAULT);

bmqt::UriParser::initialize(bmqtst::TestHelperUtil::allocator());

switch (_testCase) {
case 0:
case 5: test5_isValidFanoutConsumerSubId(); break;
Expand All @@ -409,7 +407,5 @@ int main(int argc, char* argv[])
} break;
}

bmqt::UriParser::shutdown();

TEST_EPILOG(bmqtst::TestHelper::e_CHECK_DEF_GBL_ALLOC);
}
Loading
Loading