Github user phrocker commented on a diff in the pull request: https://github.com/apache/nifi-minifi-cpp/pull/100#discussion_r117346914 --- Diff: libminifi/test/unit/SocketTests.cpp --- @@ -183,3 +196,42 @@ TEST_CASE("TestSocketWriteTestAfterClose", "[TestSocket6]") { server.closeStream(); } + +std::atomic<uint8_t> counter; +std::mt19937_64 seed { std::random_device { }() }; +bool createSocket() { + int mine = counter++; + std::shared_ptr<minifi::Configure> configuration = std::make_shared< + minifi::Configure>(); + + std::uniform_int_distribution<> distribution { 10, 100 }; + std::this_thread::sleep_for(std::chrono::milliseconds { distribution(seed) }); + + for (int i = 0; i < 50; i++) { + std::shared_ptr<TLSContext> socketA = std::make_shared<TLSContext>( + configuration); + socketA->initialize(); + } + + return true; +} --- End diff -- add some comments to why this exists.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---