B
B
BonBon Slick2019-01-24 17:03:51
Continuous Integration
BonBon Slick, 2019-01-24 17:03:51

CI tests fall, but locally they always pass?

Perhaps on the other side there is some kind of cache?
There are no cache settings in the gitlab CI config file.
locally

...............................................................  63 / 190 ( 33%)
............................................................... 126 / 190 ( 66%)
............................................................... 189 / 190 ( 99%)
.

gitlab CI pipeline, phpunit
......................FSSSS.ES......ESS........................  63 / 190 ( 33%)
............................................................... 126 / 190 ( 66%)
............................................................... 189 / 190 ( 99%)
.                                                               190 / 190 (100%)

Type errors
--- Expected
+++ Actual
@@ @@
-'/account/1'
+'/account/6'

The next launch is already ID increased, and will not be 10 but let's say 13
-'/account/1'
+'account/13'

It’s not clear why 6, either some kind of cache is used that is only on the gitlab side, or the database connection is new, since we cache and all hashes are transactional, if in each test there is a new connection to the database, then transactions may not work, because in the test 1 is launched and in test 5 rollback.
Or maybe the database is not cleared, so it sculpts new records with new IDs from 1st.
Tried enabling and disabling inmemmory for sqllite, didn't help.
How to catch this bug? If there is some kind of cache, how can I disable it for verification? Can the CI cache be cleared?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
stkevich, 2019-02-02
@BonBonSlick

You would show the contents of ci in the question about ci. And (or) the tests themselves in the question of falling tests.
Actually, it would also be useful to know What runner do you use? Shared or your own? If yours, which one? Docker, shell, sssh, etc?
Offhand, I can assume that the tests do not clean up after themselves. The shell runner is used and the base on the server where the runner is installed is filled and not cleaned.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question