Remove unwanted output from unit tests

This commit is contained in:
Alexey Milovidov 2020-04-08 00:38:31 +03:00
parent 292579cad0
commit 78b0bb6a3f

View File

@ -17,8 +17,10 @@
#include <unordered_map>
#include <iostream>
#include <sstream>
#include <Common/hex.h>
using namespace DB;
template <typename T>
@ -69,6 +71,8 @@ void checkColumn(
std::unordered_map<UInt32, T> map;
size_t num_collisions = 0;
std::stringstream collitions_str;
for (size_t i = 0; i < eq_class.size(); ++i)
{
auto & val = eq_class[i];
@ -82,12 +86,16 @@ void checkColumn(
if (num_collisions <= max_collisions_to_print)
{
std::cout << "Collision:\n";
std::cout << print_for_row(it->second) << '\n';
std::cout << print_for_row(i) << std::endl;
collitions_str << "Collision:\n";
collitions_str << print_for_row(it->second) << '\n';
collitions_str << print_for_row(i) << std::endl;
}
else if (num_collisions > allowed_collisions)
if (num_collisions > allowed_collisions)
{
std::cerr << collitions_str.rdbuf();
break;
}
}
}