Skip to content
Snippets Groups Projects
Commit 197088c3 authored by Vladimir Davydov's avatar Vladimir Davydov
Browse files

test: fix flaky engine/errinj_ddl test

The commit fixes the following test failure:

```
[011] engine/errinj_ddl.test.lua                      memtx           [ fail ]
[011]
[011] Test failed! Result content mismatch:
[011] --- engine/errinj_ddl.result      Tue Jan 18 15:28:21 2022
[011] +++ var/rejects/engine/errinj_ddl.reject  Tue Jan 18 15:28:26 2022
[011] @@ -343,7 +343,7 @@
[011]  s:create_index('sk', {parts = {2, 'unsigned'}}) -- must fail
[011]  ---
[011]  - error: Duplicate key exists in unique index "sk" in space "test" with old tuple
[011] -    - [101, 101, "xxxxxxxxxxxxxxxx"] and new tuple - [100, 101]
[011] +    - [100, 101] and new tuple - [101, 101, "xxxxxxxxxxxxxxxx"]
[011]  ...
[011]  ch:get()
[011]  ---
```

The test is inherently racy: a conflicting tuple may be inserted to the
new index either by the index build procedure or by the test fiber doing
DML in the background. The error messages will disagree regarding what
tuple should be considered old and which one new. Let's match the error
message explicitly.

The failure was introduced by d11fb306
("box: change ER_TUPLE_FOUND message") which enhanced error messages
with conflicting tuples.
parent 41fdd2a8
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment