MXS-1929: Fix mock testing framework

The testing framework extended the public struct, not the private
one. Also moved the internal Session class inside the mxs namespace to
prevent conflicts with the mock testing Session class.
This commit is contained in:
Markus Mäkelä 2018-08-06 08:41:03 +03:00
parent 6c6567cce7
commit 9d30c524e3
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19
2 changed files with 5 additions and 4 deletions

View File

@ -48,8 +48,6 @@ struct RegistryTraits<MXS_SESSION>
}
};
}
typedef struct SESSION_VARIABLE
{
session_variable_handler_t handler;
@ -122,4 +120,6 @@ private:
DCBSet m_dcb_set; /*< Set of associated backend DCBs */
};
}
std::unique_ptr<ResultSet> sessionGetList();

View File

@ -13,10 +13,11 @@
*/
#include "mock.hh"
#include <maxscale/session.h>
#include <maxscale/protocol/mysql.h>
#include "client.hh"
#include "../../../core/internal/session.hh"
namespace maxscale
{
@ -27,7 +28,7 @@ namespace mock
* The class Session provides a mock MXS_SESSION that can be used when
* testing.
*/
class Session : public MXS_SESSION
class Session : public mxs::Session
{
Session(const Session&);
Session& operator = (Session&);