fix some tests

This commit is contained in:
chertus 2018-07-11 21:34:12 +03:00
parent a765aef4db
commit 3c39f2fc69
3 changed files with 13 additions and 8 deletions

View File

@ -33,13 +33,17 @@ RemoteBlockOutputStream::RemoteBlockOutputStream(Connection & connection_, const
if (!header)
throw Exception("Logical error: empty block received as table structure", ErrorCodes::LOGICAL_ERROR);
}
else if (Protocol::Server::CapnProto == packet.type)
{
metadata = packet.block;
}
else if (Protocol::Server::Exception == packet.type)
{
packet.exception->rethrow();
return;
}
else
throw NetException("Unexpected packet from server (expected Data or Exception, got "
throw NetException("Unexpected packet from server (expected Data, CapnProto or Exception, got "
+ String(Protocol::Server::toString(packet.type)) + ")", ErrorCodes::UNEXPECTED_PACKET_FROM_SERVER);
}

View File

@ -35,6 +35,7 @@ private:
String query;
const Settings * settings;
Block header;
Block metadata;
bool finished = false;
};

View File

@ -1,7 +1,7 @@
0 0 6 6 6
0 5 5 1.7917595 5
1 1 2 1.0986123 42
1 1 2 1.0986123 42
2 2 4 1.609438 2
3 3 3 3 3
4 0 4 1.609438 42
0 0 6 6 6
0 5 5 1.7917595 5
1 1 2 1.0986123 42
1 1 2 1.0986123 42
2 2 4 1.609438 2
3 3 3 3 3
4 0 4 1.609438 42