Skip to content

Commit 1a131d4

Browse files
authored
Merge pull request #1202 from github/ensure-test-errors-detected
Fix migration test passing when `convert-utf8mb4` test setup was partially failing
2 parents 3613f22 + 45cf63c commit 1a131d4

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

localtests/convert-utf8mb4/create.sql

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ create table gh_ost_test (
77
primary key(id)
88
) auto_increment=1;
99

10-
insert into gh_ost_test values (null, 'átesting');
11-
12-
1310
insert into gh_ost_test values (null, 'Hello world, Καλημέρα κόσμε, コンニチハ', 'átesting0', 'initial');
1411

1512
drop event if exists gh_ost_test;

localtests/test.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,14 @@ test_single() {
117117
fi
118118

119119
gh-ost-test-mysql-master --default-character-set=utf8mb4 test < $tests_path/$test_name/create.sql
120+
test_create_result=$?
121+
122+
if [ $test_create_result -ne 0 ] ; then
123+
echo
124+
echo "ERROR $test_name create failure. cat $tests_path/$test_name/create.sql:"
125+
cat $tests_path/$test_name/create.sql
126+
return 1
127+
fi
120128

121129
extra_args=""
122130
if [ -f $tests_path/$test_name/extra_args ] ; then
@@ -255,7 +263,7 @@ build_binary() {
255263

256264
test_all() {
257265
build_binary
258-
find $tests_path ! -path . -type d -mindepth 1 -maxdepth 1 | cut -d "/" -f 3 | egrep "$test_pattern" | while read test_name ; do
266+
find $tests_path ! -path . -type d -mindepth 1 -maxdepth 1 | cut -d "/" -f 3 | egrep "$test_pattern" | sort | while read test_name ; do
259267
test_single "$test_name"
260268
if [ $? -ne 0 ] ; then
261269
create_statement=$(gh-ost-test-mysql-replica test -t -e "show create table _gh_ost_test_gho \G")

0 commit comments

Comments
 (0)