You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, given an test file, say t/some_test.test:
sh> cat t/some_test.test -n
1 drop database if exists tdb;
2 create database tdb;
3 use tdb;
4
5 create table t(a int primary key);
6 insert into t values (1);
7 # an incorrect expected error
8 --Error 1062
9 insert into t values (2);
Notice that at line 8, an incorrect expected error("--Error 1062") is given, and when we try to record the result, MySQL test framework reports an error like the followings:
sh>mysqltest -u root < t/mysql_replace.test
drop database if exists tdb;
create database tdb;
use tdb;
create table t(a int primary key);
insert into t values (1);
mysqltest: At line 9: Query 'insert into t values (2)' succeeded, should have failed with error '1062'
not ok
But in this framework, recording is done successfully:
sh>run-tests.sh -s tidb-server -r some_test -b n
skip building tidb-server, using existing binary: ./tidb-server
skip building mysqltest, using existing binary: ./mysql_test
start tidb-server, log file: ./mysql-test.out
tidb-server(PID: 10971) started
record result for case: "some_test"
./t/some_test.test: ok! 2 test cases passed, take time 0.023170004 s
Great, All tests passed
mysqltest end
tidb-server(PID: 10971) stopped
The text was updated successfully, but these errors were encountered:
bb7133
changed the title
*: Different expected error behavior when recording the test output.
(Call For Participation)*: Different expected error behavior when recording the test output.
Mar 23, 2020
For example, given an test file, say
t/some_test.test
:Notice that at line
8
, an incorrect expected error("--Error 1062
") is given, and when we try to record the result, MySQL test framework reports an error like the followings:But in this framework, recording is done successfully:
The text was updated successfully, but these errors were encountered: