Fix crash in the Linux unittest in the HTTP client code, in Socket::readBytes. Cobra Metrics Publisher code returns the message id of the message that got published, to be used to validated that it got sent properly when receiving an ack.
This commit is contained in:
@ -53,7 +53,8 @@ namespace ix
|
||||
|
||||
if (!stress)
|
||||
{
|
||||
cobraMetricsPublisher.push(channel, data);
|
||||
auto msgId = cobraMetricsPublisher.push(channel, data);
|
||||
spdlog::info("Sent message: {}", msgId);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -70,11 +70,11 @@ namespace ix
|
||||
spdlog::info("Publisher authenticated");
|
||||
authenticated = true;
|
||||
|
||||
spdlog::info("Publishing data");
|
||||
|
||||
Json::Value channels;
|
||||
channels[0] = channel;
|
||||
conn.publish(channels, data);
|
||||
auto msgId = conn.publish(channels, data);
|
||||
|
||||
spdlog::info("Published msg {}", msgId);
|
||||
}
|
||||
else if (eventType == ix::CobraConnection_EventType_Subscribed)
|
||||
{
|
||||
@ -91,7 +91,7 @@ namespace ix
|
||||
}
|
||||
else if (eventType == ix::CobraConnection_EventType_Published)
|
||||
{
|
||||
spdlog::info("Published message acked: {}", msgId);
|
||||
spdlog::info("Published message id {} acked", msgId);
|
||||
messageAcked = true;
|
||||
condition.notify_one();
|
||||
}
|
||||
|
Reference in New Issue
Block a user