? ? Success

User tests: Successful: Unsuccessful:

avatar csthomas
csthomas
1 Sep 2016

Summary of Changes

Currently JCacheTest->testGc() method work with cache disabled, without configured storage, but take 5 seconds.

Changes:

  • enable caching
  • set storage to file
  • remove sleep(5) and use TestReflection to change modification time of cached file.
  • After garbage collection:
    • add test for file exists before check cache data. File storage deletes expired file on get method so we have to check file exists before get to be sure that gc works as expected.
    • add additional test for non expired data

Testing Instructions

Travis passed.
Require code review.

Documentation Changes Required

None

avatar csthomas csthomas - open - 1 Sep 2016
avatar csthomas csthomas - change - 1 Sep 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 1 Sep 2016
Category Unit Tests
avatar joomla-cms-bot joomla-cms-bot - change - 1 Sep 2016
Labels Added: ? ?
avatar andrepereiradasilva
andrepereiradasilva - comment - 2 Sep 2016

see csthomas#3 for futher improvements

avatar andrepereiradasilva
andrepereiradasilva - comment - 2 Sep 2016

@csthomas can you check my patch here too?

avatar andrepereiradasilva
andrepereiradasilva - comment - 2 Sep 2016

@csthomas i prefer my https://github.com/csthomas/joomla-cms/pull/3/files because it makes sure we only delete expired cache.

avatar andrepereiradasilva
andrepereiradasilva - comment - 2 Sep 2016

May be you have rights that on JCacheTest we should not use low level var like handler->_now

Did not understood

avatar csthomas
csthomas - comment - 2 Sep 2016

Sorry I say about something else.

avatar csthomas
csthomas - comment - 2 Sep 2016

I agree with you that some value should stay after gc.

avatar andrepereiradasilva
andrepereiradasilva - comment - 2 Sep 2016

ok will wait for the changes them.

avatar andrepereiradasilva
andrepereiradasilva - comment - 3 Sep 2016

Latest staging (your other patch already merged)

Before Patch:
Time: 5.38 seconds, Memory: 10.00MB

After Patch:
Time: 835 ms, Memory: 10.00MB

So almost 5 seconds less in all unit tests.

avatar andrepereiradasilva andrepereiradasilva - test_item - 3 Sep 2016 - Tested successfully
avatar andrepereiradasilva
andrepereiradasilva - comment - 3 Sep 2016

I have tested this item successfully on 6488d47

as comments above


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11872.

avatar andrepereiradasilva
andrepereiradasilva - comment - 3 Sep 2016

wow just check a php 7 travis build and the unit test runned in 20 sec, even without this PR that will decrease that time in more 5 sec

image
https://travis-ci.org/joomla/joomla-cms/jobs/157294479#L1248

avatar andrepereiradasilva
andrepereiradasilva - comment - 19 Sep 2016

can we have another test or review here so we can make all unit tests 5 seconds faster?

avatar csthomas csthomas - change - 26 Sep 2016
The description was changed
avatar csthomas csthomas - change - 26 Sep 2016
Title
Run test at JCacheTest->testGc with not empty storage and caching enabled
Unitests: enable caching on test JCacheTest->testGc, 5 seconds less
avatar csthomas csthomas - change - 26 Sep 2016
Title
Run test at JCacheTest->testGc with not empty storage and caching enabled
Unitests: enable caching on test JCacheTest->testGc, 5 seconds less
avatar csthomas csthomas - change - 28 Sep 2016
The description was changed
avatar csthomas csthomas - change - 5 Oct 2016
The description was changed
avatar csthomas
csthomas - comment - 11 Oct 2016

This PR is only for unittest speed up - 5 seconds less.

Is no one is interested?

avatar andrepereiradasilva
andrepereiradasilva - comment - 11 Oct 2016

@zero-24 can you test also?

avatar csthomas csthomas - change - 29 Oct 2016
Title
Unitests: enable caching on test JCacheTest->testGc, 5 seconds less
Fix unittest on cache - 5 seconds less
avatar csthomas csthomas - change - 29 Oct 2016
Title
Unitests: enable caching on test JCacheTest->testGc, 5 seconds less
Fix unittest on cache - 5 seconds less
avatar csthomas csthomas - edited - 29 Oct 2016
avatar joomla-cms-bot joomla-cms-bot - change - 29 Oct 2016
Labels Removed: ?
avatar photodude
photodude - comment - 12 Dec 2016

I have tested this item successfully on 6488d47

Looks good, by code review


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/11872.

avatar photodude photodude - test_item - 12 Dec 2016 - Tested successfully
avatar jeckodevelopment jeckodevelopment - change - 13 Dec 2016
Status Pending Ready to Commit
avatar jeckodevelopment
jeckodevelopment - comment - 13 Dec 2016

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/11872.

avatar jeckodevelopment jeckodevelopment - edited - 13 Dec 2016
avatar jeckodevelopment jeckodevelopment - change - 13 Dec 2016
Milestone Added:
avatar rdeutz rdeutz - reference | a720cf9 - 13 Dec 16
avatar rdeutz rdeutz - merge - 13 Dec 2016
avatar rdeutz rdeutz - close - 13 Dec 2016
avatar rdeutz rdeutz - change - 13 Dec 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-12-13 12:13:40
Closed_By rdeutz
Labels Added: ? ?
avatar rdeutz rdeutz - close - 13 Dec 2016
avatar rdeutz rdeutz - merge - 13 Dec 2016
avatar csthomas csthomas - head_ref_deleted - 13 Dec 2016
avatar cpfeifer cpfeifer - reference | fb3e6ba - 22 Dec 16

Add a Comment

Login with GitHub to post a comment