MXS-1267: Fix tee filter test results
The tests should no longer expect client session creation to fail if the branch session creation is not successful. The main session is kept alive so that a failure in the branch session does not cause a failure of the main session. The main session can be considered more important as it is what the client will use. If the branch session fails, the failure will be logged so no information is lost. Also added a missing configuration file and removed some extra-verbose output in a test script.
This commit is contained in:
@ -50,9 +50,9 @@ LocalClient::~LocalClient()
|
||||
|
||||
bool LocalClient::queue_query(GWBUF* buffer)
|
||||
{
|
||||
GWBUF* my_buf = gwbuf_clone(buffer);
|
||||
GWBUF* my_buf = NULL;
|
||||
|
||||
if (my_buf)
|
||||
if (m_state != VC_ERROR && (my_buf = gwbuf_clone(buffer)))
|
||||
{
|
||||
m_queue.push_back(my_buf);
|
||||
|
||||
|
@ -241,14 +241,12 @@ static void setUpstream(MXS_FILTER *instance, MXS_FILTER_SESSION *session, MXS_U
|
||||
static int routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *session, GWBUF *queue)
|
||||
{
|
||||
TeeSession *my_session = reinterpret_cast<TeeSession*>(session);
|
||||
int rval = 0;
|
||||
|
||||
if (my_session->passive || my_session->client->queue_query(queue))
|
||||
{
|
||||
rval = my_session->down.routeQuery(my_session->down.instance,
|
||||
int rval = my_session->down.routeQuery(my_session->down.instance,
|
||||
my_session->down.session,
|
||||
queue);
|
||||
}
|
||||
|
||||
my_session->client->queue_query(queue);
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
Reference in New Issue
Block a user