Bug 17638

Summary: t/db_dependent/Search.t is failing
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: hector.hecaxmmx, josef.moravec, kyle, mtj, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17664
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 17638: Flush the config cache on setting a new context
Bug 17638: Make sure t/db_dependent/Search.t doesn't use a cached koha-conf.xml
Bug 17638: Make sure t/db_dependent/Search.t doesn't use a cached koha-conf.xml
[SIGNED-OFF]Bug 17638: Make sure t/db_dependent/Search.t doesn't use a cached koha-conf.xml
Bug 17638: Make sure t/db_dependent/Search.t doesn't use a cached koha-conf.xml

Description Jonathan Druart 2016-11-16 07:57:17 UTC

    
Comment 1 Jonathan Druart 2016-11-16 09:26:48 UTC
Created attachment 57529 [details] [review]
Bug 17638: Flush the config cache on setting a new context
Comment 2 Jonathan Druart 2016-11-16 09:27:45 UTC
This patch fixes a big part of the tests, but some keep failing.
I'd like someone to take a look, I am stuck with the other ones.
It seems to be caused by bug 11921, but I don't manage to understand what's going wrong.
Comment 3 Kyle M Hall 2016-11-16 11:31:14 UTC
I'm not seeing any difference with "prove t/db_dependent/Search.t" with this patch than I do without. Am I testing the wrong file?
Comment 4 Jonathan Druart 2016-11-16 14:03:26 UTC
(In reply to Kyle M Hall from comment #3)
> I'm not seeing any difference with "prove t/db_dependent/Search.t" with this
> patch than I do without. Am I testing the wrong file?

You should get less failures with this patch
Comment 5 Kyle M Hall 2016-11-16 14:08:51 UTC
(In reply to Jonathan Druart from comment #4)
> (In reply to Kyle M Hall from comment #3)
> > I'm not seeing any difference with "prove t/db_dependent/Search.t" with this
> > patch than I do without. Am I testing the wrong file?
> 
> You should get less failures with this patch

Without patch: http://paste.koha-community.org/169
With patch: http://paste.koha-community.org/170

I'm not seeing a difference. That being said, it doesn't cause any problems either.
Comment 6 Josef Moravec 2016-11-16 14:24:24 UTC
(In reply to Kyle M Hall from comment #5)
> (In reply to Jonathan Druart from comment #4)
> > (In reply to Kyle M Hall from comment #3)
> > > I'm not seeing any difference with "prove t/db_dependent/Search.t" with this
> > > patch than I do without. Am I testing the wrong file?
> > 
> > You should get less failures with this patch
> 
> Without patch: http://paste.koha-community.org/169
> With patch: http://paste.koha-community.org/170
> 
> I'm not seeing a difference. That being said, it doesn't cause any problems
> either.

For me it absolutely makes diferences
On master: http://paste.koha-community.org/172
With this patch: http://paste.koha-community.org/173
Comment 7 Jonathan Druart 2016-11-16 14:38:55 UTC
(In reply to Josef Moravec from comment #6)
> (In reply to Kyle M Hall from comment #5)
> > (In reply to Jonathan Druart from comment #4)
> > > (In reply to Kyle M Hall from comment #3)
> > > > I'm not seeing any difference with "prove t/db_dependent/Search.t" with this
> > > > patch than I do without. Am I testing the wrong file?
> > > 
> > > You should get less failures with this patch
> > 
> > Without patch: http://paste.koha-community.org/169
> > With patch: http://paste.koha-community.org/170
> > 
> > I'm not seeing a difference. That being said, it doesn't cause any problems
> > either.
> 
> For me it absolutely makes diferences
> On master: http://paste.koha-community.org/172
> With this patch: http://paste.koha-community.org/173

Yes, it's what I get.
Comment 8 Tomás Cohen Arazi 2016-11-16 14:42:38 UTC
Created attachment 57551 [details] [review]
Bug 17638: Make sure t/db_dependent/Search.t doesn't use a cached koha-conf.xml

This patch makes the tests clean the 'config' namespace for cache before
it runs any tests.

To test:
- Run:
  $ prove t/db_dependent/Search.t
=> FAIL: Self explanatory
- Apply the patch
- Run:
  $ prove t/db_dependent/Search.t
=> SUCCESS: All green
- Sign off :-D
Comment 9 Tomás Cohen Arazi 2016-11-16 14:44:02 UTC
Created attachment 57552 [details] [review]
Bug 17638: Make sure t/db_dependent/Search.t doesn't use a cached koha-conf.xml

This patch makes the tests clean the 'config' namespace for cache before
it runs any tests.

To test:
- Run:
  $ prove t/db_dependent/Search.t
=> FAIL: Self explanatory
- Apply the patch
- Run:
  $ prove t/db_dependent/Search.t
=> SUCCESS: All green
- Sign off :-D
Comment 10 Héctor Eduardo Castro Avalos 2016-11-16 16:26:24 UTC
Created attachment 57568 [details] [review]
[SIGNED-OFF]Bug 17638: Make sure t/db_dependent/Search.t doesn't use a cached koha-conf.xml

This patch makes the tests clean the 'config' namespace for cache before
it runs any tests.

To test:
- Run:
  $ prove t/db_dependent/Search.t
=> FAIL: Self explanatory
- Apply the patch
- Run:
  $ prove t/db_dependent/Search.t
=> SUCCESS: All green
- Sign off :-D

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
All test pass successfuly
Comment 11 Kyle M Hall 2016-11-16 18:55:53 UTC
Created attachment 57575 [details] [review]
Bug 17638: Make sure t/db_dependent/Search.t doesn't use a cached koha-conf.xml

This patch makes the tests clean the 'config' namespace for cache before
it runs any tests.

To test:
- Run:
  $ prove t/db_dependent/Search.t
=> FAIL: Self explanatory
- Apply the patch
- Run:
  $ prove t/db_dependent/Search.t
=> SUCCESS: All green
- Sign off :-D

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
All test pass successfuly

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Cannot reproduce, but I trust everyone telling me it's failing ; )
No regressions spotted
Comment 12 Kyle M Hall 2016-11-16 19:14:57 UTC
Pushed to master for 16.11, thanks Tomas!
Comment 13 Mason James 2016-12-14 11:34:44 UTC
Pushed to 16.05.x, for 16.05.06 release