Project

General

Profile

Actions

Bug #19437

closed

ComputeResourceCacheTest fails with empty file cache

Added by Dominic Cleal almost 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Tests
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

In CI, the following test failure occurred with ComputeResourceCacheTest:

+ bundle exec rake pkg:generate_source jenkins:unit TESTOPTS=-v
rm -rf jenkins/reports/unit/
The Apipie cache is turned off. Enable it and run apipie:cache rake task to speed up API calls.
WARNING: `rake webpack:compile` failed to run. This is only important if running integration tests. (cause: Can't find our webpack executable at /var/lib/workspace/workspace/test_develop/database/mysql/ruby/2.1/slave/fast/node_modules/.bin/webpack - have you run `npm install`?)
The Apipie cache is turned off. Enable it and run apipie:cache rake task to speed up API calls.
  * DEFERRED: MenuItem::MenuItem#caption should be tested. 
  * DEFERRED: MenuItem::MenuItem#html_options should be tested. 
Run options: -v --ci-reporter --seed 27810

# Running:

ComputeResourceCacheTest::with caching enabled#test_0001_it caches data = 1.03 s = E
ComputeResourceCacheTest::with caching enabled#test_0003_#delete deletes keys from the cache = 0.00 s = E
ComputeResourceCacheTest::with caching enabled#test_0004_#write and #read store and read data in the cache = 0.00 s = E
ComputeResourceCacheTest::with caching enabled#test_0002_refresh the cache = 0.00 s = E
Api::V2::TemplateKindsControllerTest#test_0001_should get index = 0.39 s = .
LookupKeyTest::when key is a boolean and default_value is a string#test_0001_default_value is not validated if omit is true = 0.15 s = .

The test attempts to clear the cache in a setup method, which resulted in:

  1) Error:
ComputeResourceCacheTest::with caching enabled#test_0001_it caches data:
Errno::ENOENT: No such file or directory @ dir_initialize - /var/lib/workspace/workspace/test_develop/database/mysql/ruby/2.1/slave/fast/tmp/cache/paralleltests
    test/unit/compute_resource_cache_test.rb:5:in `block in <class:ComputeResourceCacheTest>'

This is already handled in the reset_setting_cache setup/teardown methods in active_support_test_case_helper as the Rails cache may be missing on a clean checkout and when executing the very first tests.

The cache clear can be removed from ComputeResourceCacheTest and other similar test cases.

Actions #1

Updated by The Foreman Bot almost 7 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4499 added
Actions #2

Updated by Dominic Cleal almost 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #3

Updated by Marek Hulán almost 7 years ago

  • translation missing: en.field_release set to 240
Actions

Also available in: Atom PDF