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;
};