Bugzilla – Attachment 144985 Details for
Bug 32561
background job worker is still running with all the modules in RAM
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32561: Add test
Bug-32561-Add-test.patch (text/plain), 2.00 KB, created by
Kyle M Hall (khall)
on 2023-01-04 11:53:45 UTC
(
hide
)
Description:
Bug 32561: Add test
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-01-04 11:53:45 UTC
Size:
2.00 KB
patch
obsolete
>From e8fdb8ec513d870a5f7d78a31a19c0b2204079fe Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 4 Jan 2023 10:09:57 +0100 >Subject: [PATCH] Bug 32561: Add test > >This test does not seem reliable enough, how could we improve it? > >I guess it will fail randomly, especially if ran in parallel with other >processes/tests. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > xt/memory_check.t | 36 ++++++++++++++++++++++++++++++++++++ > 1 file changed, 36 insertions(+) > create mode 100644 xt/memory_check.t > >diff --git a/xt/memory_check.t b/xt/memory_check.t >new file mode 100644 >index 0000000000..eaaa860870 >--- /dev/null >+++ b/xt/memory_check.t >@@ -0,0 +1,36 @@ >+#!/usr/bin/perl >+ >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <http://www.gnu.org/licenses>. >+ >+use Modern::Perl; >+use Test::More tests => 1; >+ >+my $pid = qx[ps ax | grep 'background_jobs_worker.pl --queue default' | grep -v grep | tail -n1 | awk '{print \$1}']; >+ >+chomp $pid; >+ >+SKIP: { >+ skip "No background_jobs_worker.pl process running for the default queue", 1 >+ unless $pid; >+ my $memory_usage = qx[pmap -x $pid | tail -n 1 | awk '/[0-9]/{print \$3}']; >+ chomp $memory_usage; >+ if ( $memory_usage > 150000 ) { >+ fail("background_jobs_worker.pl is consuming more than 150Mo in memory: $memory_usage"); >+ } >+ else { >+ pass("background_jobs_worker.pl is consuming $memory_usage in memory"); >+ } >+} >-- >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 32561
:
144973
|
144974
|
144975
|
144984
|
144985
|
144986
|
145617