Bugzilla – Attachment 159670 Details for
Bug 35507
Fix handling plugins in unit tests causing random failures on Jenkins
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35507: Clear cache key for enabled plugins at deletion
Bug-35507-Clear-cache-key-for-enabled-plugins-at-d.patch (text/plain), 1.19 KB, created by
Marcel de Rooy
on 2023-12-08 11:01:20 UTC
(
hide
)
Description:
Bug 35507: Clear cache key for enabled plugins at deletion
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-12-08 11:01:20 UTC
Size:
1.19 KB
patch
obsolete
>From 89d18796ff6917ded4215e955673c4c38ec19825 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 8 Dec 2023 10:58:00 +0000 >Subject: [PATCH] Bug 35507: Clear cache key for enabled plugins at deletion >Content-Type: text/plain; charset=utf-8 > >KitchenSink is still in cache key and causes other tests to fail. > >Test plan: >Install some after_biblio_action plugin. >Delete the plugin without this patch. >Run t/db_dependent/TestBuilder.t [FAIL] >Delete plugin with this patch >Run t/db_dependent/TestBuilder.t [PASS] >--- > Koha/Plugins/Handler.pm | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/Koha/Plugins/Handler.pm b/Koha/Plugins/Handler.pm >index a32487d4ad..1e4005517e 100644 >--- a/Koha/Plugins/Handler.pm >+++ b/Koha/Plugins/Handler.pm >@@ -101,6 +101,9 @@ sub delete { > enable_plugins => $args->{enable_plugins}, > }); > >+ # Clear cache too for get_enabled_plugins >+ Koha::Cache::Memory::Lite->get_instance->clear_from_cache( Koha::Plugins::ENABLED_PLUGINS_CACHE_KEY() ); >+ > C4::Context->dbh->do( "DELETE FROM plugin_data WHERE plugin_class = ?", undef, ($plugin_class) ); > Koha::Plugins::Methods->search({ plugin_class => $plugin_class })->delete(); > >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35507
:
159670
|
159739
|
159744
|
159745
|
159801
|
159802
|
159803
|
159817
|
159818
|
159846
|
159847
|
159848
|
159849
|
159850
|
159860
|
159861
|
159862