slbotbm commented on code in PR #3102:
URL: https://github.com/apache/iggy/pull/3102#discussion_r3161787792
##########
foreign/cpp/tests/client/low_level_e2e.cpp:
##########
@@ -149,3 +153,671 @@ TEST(LowLevelE2E_Client, DeleteNullConnectionIsNoop) {
iggy::ffi::Client *client = nullptr;
ASSERT_NO_THROW(iggy::ffi::delete_connection(client));
}
+
+TEST(LowLevelE2E_Client, GetStatsBeforeLoginThrows) {
+ RecordProperty("description", "Rejects get_stats before connect, and after
connect but before login.");
+ iggy::ffi::Client *client = nullptr;
+ ASSERT_NO_THROW({ client = iggy::ffi::new_connection(""); });
+ ASSERT_NE(client, nullptr);
+
+ ASSERT_THROW(client->get_stats(), std::exception);
+ ASSERT_NO_THROW(client->connect());
+ ASSERT_THROW(client->get_stats(), std::exception);
+
+ ASSERT_NO_THROW(iggy::ffi::delete_connection(client));
+ client = nullptr;
+}
+
+// TODO(slbotbm-this PR): add a test to create some streams, topics,
partitions, and segments, send messages, and create
Review Comment:
stripped. I'll fix this in the next PR
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]