MXS-1542: Add test case
Added test case that checks whether UTF16 strings work. The test is expected to fail.
This commit is contained in:
@ -518,6 +518,10 @@ add_test_executable(mxs1509.cpp mxs1509 mxs1509 LABELS REPL_BACKEND)
|
|||||||
# https://jira.mariadb.org/browse/MXS-1516
|
# https://jira.mariadb.org/browse/MXS-1516
|
||||||
add_test_executable(mxs1516.cpp mxs1516 replication LABELS REPL_BACKEND)
|
add_test_executable(mxs1516.cpp mxs1516 replication LABELS REPL_BACKEND)
|
||||||
|
|
||||||
|
# MXS-1542: Check that UTF16 strings work
|
||||||
|
# https://jira.mariadb.org/browse/MXS-1542
|
||||||
|
add_test_executable(mxs1542.cpp mxs1542 avro LABELS REPL_BACKEND)
|
||||||
|
|
||||||
# MXS-1585: Crash in MaxScale 2.1.12
|
# MXS-1585: Crash in MaxScale 2.1.12
|
||||||
# https://jira.mariadb.org/browse/MXS-1585
|
# https://jira.mariadb.org/browse/MXS-1585
|
||||||
add_test_executable(mxs1585.cpp mxs1585 mxs1585 LABELS REPL_BACKEND)
|
add_test_executable(mxs1585.cpp mxs1585 mxs1585 LABELS REPL_BACKEND)
|
||||||
|
40
maxscale-system-test/mxs1542.cpp
Normal file
40
maxscale-system-test/mxs1542.cpp
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
* MXS-1542: https://jira.mariadb.org/browse/MXS-1542
|
||||||
|
*
|
||||||
|
* Check that UTF16 strings work.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "testconnections.h"
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
TestConnections::skip_maxscale_start(true);
|
||||||
|
TestConnections::check_nodes(false);
|
||||||
|
TestConnections test(argc, argv);
|
||||||
|
|
||||||
|
test.replicate_from_master();
|
||||||
|
|
||||||
|
test.repl->connect();
|
||||||
|
execute_query(test.repl->nodes[0],
|
||||||
|
"CREATE OR REPLACE TABLE t1 (data varchar(30) NOT NULL) DEFAULT CHARSET=utf16");
|
||||||
|
execute_query(test.repl->nodes[0],
|
||||||
|
"INSERT INTO t1 VALUES ('Hello World'), ('Բարեւ աշխարհ'), ('こんにちは世界'), ('你好,世界'), ('Привет мир')");
|
||||||
|
|
||||||
|
// Wait for the data to be processed
|
||||||
|
const char* logmsg = "Waiting until more data is written";
|
||||||
|
test.ssh_maxscale(true,
|
||||||
|
"for ((i=0;i<15;i++)); do grep '%s' /var/log/maxscale/maxscale.log && break || sleep 1; done", logmsg);
|
||||||
|
|
||||||
|
// Check if the Avro file contains the inserted value
|
||||||
|
int rc = test.ssh_maxscale(true,
|
||||||
|
"maxavrocheck -d /var/lib/maxscale/avro/test.t1.000001.avro|grep 'Hello World'");
|
||||||
|
test.add_result(rc == 0, "Data is converted when a failure to convert is expected");
|
||||||
|
|
||||||
|
printf("\n"
|
||||||
|
"o-------------------------------------------------------------------o\n"
|
||||||
|
"|The test is expected to fail, change it when the MXS-1542 is fixed.|\n"
|
||||||
|
"o-------------------------------------------------------------------o\n"
|
||||||
|
"\n");
|
||||||
|
|
||||||
|
return test.global_result;
|
||||||
|
}
|
Reference in New Issue
Block a user