[otrs-cvs] otrs/scripts/test/GenericInterface/ObjectLockState ObjectLockStatePerformance.t, 1.2, 1.2.2.1
"CVS commits notifications of OTRS.org" <[email protected]>
| Newsgroups | gmane.comp.otrs.cvs |
|---|---|
| Message-ID | <[email protected]> |
Comments:
Update of /home/cvs/otrs/scripts/test/GenericInterface/ObjectLockState
In directory lancelot:/tmp/cvs-serv16621/scripts/test/GenericInterface/ObjectLockState
Modified Files:
Tag: rel-3_1
ObjectLockStatePerformance.t
Log Message:
Added possibility to configure the time limit.
Author: mh
Index: ObjectLockStatePerformance.t
===================================================================
RCS file: /home/cvs/otrs/scripts/test/GenericInterface/ObjectLockState/ObjectLockStatePerformance.t,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -2 -u -d -r1.2 -r1.2.2.1
--- ObjectLockStatePerformance.t 16 Jan 2012 15:08:39 -0000 1.2
+++ ObjectLockStatePerformance.t 22 Nov 2012 15:04:20 -0000 1.2.2.1
@@ -24,5 +24,5 @@
This test script will create 10000 records in the object lock table,
and then perform SELECT and UDPATE queries on it to make sure that
-they take not more than 0.5s each.
+they take not more than 0.5s (default config) each.
=cut
@@ -31,7 +31,8 @@
my $ObjectLockStateObject = Kernel::System::GenericInterface::ObjectLockState->new( %{$Self} );
-my $RandomNumber = int rand(10000000);
+my $RandomNumber = int rand 10000000;
my $CustomObjectType = "TestObject$RandomNumber";
-my $Success;
+
+my $TimeLimit = $Self->{ConfigObject}->Get('GenericInterface::ObjectLockState::TimeLimit') || '0.5';
my $TestDataCount = 10_000;
@@ -53,4 +54,5 @@
);
+my $Success;
for my $Count ( 1 .. $TestDataCount ) {
@@ -88,6 +90,6 @@
$Self->True(
- $TimeElapsed < 0.5,
- "ObjectLockStateGet() in $TestDataCount entries took less than 0.5s (${TimeElapsed}s)",
+ $TimeElapsed < $TimeLimit,
+ "ObjectLockStateGet() in $TestDataCount entries took less than $TimeLimit seconds (${TimeElapsed}s)",
);
@@ -112,6 +114,6 @@
$Self->True(
- $TimeElapsed < 0.5,
- "ObjectLockStateSet in $TestDataCount entries took less than 0.5s (${TimeElapsed}s)",
+ $TimeElapsed < $TimeLimit,
+ "ObjectLockStateSet in $TestDataCount entries took less than $TimeLimit seconds (${TimeElapsed}s)",
);
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log