Skip to content

Commit

Permalink
Add support for maximium connection testing
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-webb committed May 8, 2024
1 parent 1c5d98a commit dc9233f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/test/cpp/net/telnetappendertestcase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,19 @@ class TelnetAppenderTestCase : public AppenderSkeletonTestCase
void testActivateWriteNoClose()
{
TelnetAppenderPtr appender(new TelnetAppender());
appender->setLayout(createLayout());
appender->setPort(TEST_PORT);
appender->setMaxConnections(1);
Pool p;
appender->activateOptions(p);
LoggerPtr root(Logger::getRootLogger());
root->addAppender(appender);

for (int i = 0; i < 50; i++)
{
//#define ALLOW_TESTING_WITH_TELNET
#ifdef ALLOW_TESTING_WITH_TELNET
std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) );
#endif
LOG4CXX_INFO(root, "Hello, World " << i);
}
}
Expand Down

0 comments on commit dc9233f

Please sign in to comment.