The test plan_cache_clear.js tests the plan cache state via just checking the number of entries in the plan cache. This results in unstable tests because other threads may insert other plans in the cache.
Change the test so that it tests for actual presence of a queries in the cache instead of just counting the number of cache entries.