Changed-lines coverage: PR changed C/C++ lines covered by tests: 91.57% (163/178) Uncovered changed code (with context): ================================================================================ src/Storages/NATS/INATSConsumer.cpp ================================================================================ --- uncovered block 133-133 --- 131 | /// the broker has to deliver them again. 132 | for (auto & msg : consumed_messages) >> 133 | nackMessage(msg.get()); 134 | consumed_messages.clear(); 135 | --- uncovered block 215-215 --- 213 | /// nothing was recorded - so a cycle that skips one has nothing to move here. 214 | if (consumed_messages.empty()) >> 215 | return; 216 | 217 | skipped_messages.push_back(std::move(consumed_messages.back())); ================================================================================ src/Storages/NATS/INATSConsumer.h ================================================================================ --- uncovered block 100-100 --- 98 | void dropBuffered(); 99 | >> 100 | size_t subjectsCount() { return subjects.size(); } 101 | 102 | bool isConsumerStopped() { return stopped; } ================================================================================ src/Storages/NATS/NATSConnection.cpp ================================================================================ --- uncovered block 28-30 --- 26 | auto status = natsStatistics_Create(&new_statistics); 27 | if (status != NATS_OK) >> 28 | throw Exception( >> 29 | ErrorCodes::CANNOT_CONNECT_NATS, >> 30 | "Can not create NATS statistics. Nats error: {}", natsStatus_GetText(status)); 31 | statistics.reset(new_statistics); 32 | --- uncovered block 112-112 --- 110 | { 111 | std::lock_guard lock(mutex); >> 112 | return isClosedImpl(lock); 113 | } 114 | --- uncovered block 119-132 --- 117 | std::lock_guard lock(mutex); 118 | if (!connection) >> 119 | return 0; 120 | 121 | auto status = natsConnection_GetStats(connection.get(), statistics.get()); 122 | if (status != NATS_OK) >> 123 | throw Exception( >> 124 | ErrorCodes::CANNOT_CONNECT_NATS, >> 125 | "Can not get statistics of connection to {}. Nats error: {}", connectionInfoForLog(), natsStatus_GetText(status)); 126 | 127 | uint64_t reconnects = 0; 128 | status = natsStatistics_GetCounts(statistics.get(), nullptr, nullptr, nullptr, nullptr, &reconnects); 129 | if (status != NATS_OK) >> 130 | throw Exception( >> 131 | ErrorCodes::CANNOT_CONNECT_NATS, >> 132 | "Can not read statistics of connection to {}. Nats error: {}", connectionInfoForLog(), natsStatus_GetText(status)); 133 | 134 | return reconnects; ================================================================================ src/Storages/NATS/NATSConnection.h ================================================================================ --- uncovered block 60-60 --- 58 | 59 | natsConnection * getConnection() { return connection.get(); } >> 60 | int getReconnectWait() const { return configuration.reconnect_wait; } 61 | 62 | /// How many times the client has re-established this connection. The client restores a WARNING: Failed to get start time for [Print Uncovered Code] - start time and duration won't be set --- Coverage counts --- Lines : baseline 1,053,985/1,187,229 -> current 1,053,899/1,187,351 (delta -86 / +122) Functions : baseline 817,989/891,308 -> current 817,996/891,315 (delta +7 / +7) Branches : baseline 351,679/433,154 -> current 351,447/433,208 (delta -232 / +54)