-
Bug
-
Resolution: Fixed
-
Minor
-
2.6.5, 2.7.2, 2.8
-
MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
-
MOODLE_26_STABLE, MOODLE_27_STABLE
-
47917-28
-
- Set up two memcached servers to run - one on 11211 and one on 11212
- Add this to your config.php define('TEST_CACHESTORE_MEMCACHED_TESTSERVERS', '127.0.0.1:11211' . "\n" . '127.0.0.1:11212');
- Run unit tests
Was doing a complete run (without unit tests skipped) of Moodle 2.8, so I defined 2 memcached instances:
define('TEST_CACHESTORE_MEMCACHED_TESTSERVERS', '127.0.0.1:11211' . "\n" . '127.0.0.1:11212');
|
And then I get this constant failure:
There was 1 failure:
|
|
1) cachestore_memcached_test::test_test_instance
|
Failed asserting that Array (
|
'many5' => 'many5'
|
'many1' => 'many1'
|
'many3' => 'many3'
|
'many6' => false
|
) is identical to Array (
|
'many1' => 'many1'
|
'many3' => 'many3'
|
'many5' => 'many5'
|
'many6' => false
|
).
|
|
/Users/stronk7/git_moodle/integration/cache/tests/fixtures/stores.php:151
|
/Users/stronk7/git_moodle/integration/cache/tests/fixtures/stores.php:61
|
/Users/stronk7/git_moodle/integration/lib/phpunit/classes/advanced_testcase.php:80
|
|
To re-run:
|
vendor/bin/phpunit -v cachestore_memcached_test cache/stores/memcached/tests/memcached_test.php
|
So I tried using the Memcached::GET_PRESERVE_ORDER flag in the getMulti() call. But then ended with:
1) cachestore_memcached_test::test_test_instance
|
Failed asserting that Array (
|
'many1' => 'many1'
|
'many3' => 'many3'
|
'many5' => 'many5'
|
'many6' => null
|
) is identical to Array (
|
'many1' => 'many1'
|
'many3' => 'many3'
|
'many5' => 'many5'
|
'many6' => false
|
).
|
(i.e. seems that using that flag returns null for non-existing elements)
So, I'm not sure if we can change those nulls to falses safely (and rely in the flag to return key-ordered results) or, instead, we should iterate in PHP and build the results array manually.
But we need this fixed to get a 100% pass without skipped tests. And order sounds like a good thing to get observed IMO.
To decide and fix, ciao
- blocks
-
MDLSITE-2356 Reduce the skipped tests in CI servers
- Closed