Skip to content

Commit dd6c02a

Browse files
author
Sergey Abramkin
committed
dbg code
1 parent 93c6117 commit dd6c02a

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

bindings/cpp/callback_p.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ class callback_result_data : public callback_result_data_base
131131

132132
bool is_ack() const override
133133
{
134+
//printf("DBG status %d, size %d, index %d, empty %d\n", int(status()), int(data.size()), int(data.offset()), int(data.empty()));
134135
return status() == 0 && data().empty();
135136
}
136137

tests/test.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,14 @@ static void test_bulk_remove(session &sess, size_t test_count)
546546
for (auto it = result.begin(); it != result.end(); ++it) {
547547
// count only acks since they are the only packets returned by remove()
548548
count += (it->status() == 0) && (it->is_ack());
549+
if (!it->is_ack()) {
550+
std::cout
551+
<< ": raw_data_size = " << it->raw_data().size()
552+
<< ", data_size = " << it->data().size()
553+
<< ", size = " << it->size()
554+
<< ", headsize = " << (sizeof(dnet_addr) +sizeof(dnet_cmd))
555+
<< "\n";
556+
}
549557
BOOST_WARN_EQUAL(it->status(), 0);
550558
}
551559
BOOST_REQUIRE_EQUAL(count, test_count * 2);

0 commit comments

Comments
 (0)