summaryrefslogtreecommitdiff
path: root/tests/phpunit/includes/jobqueue/JobQueueTest.php
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:30:02 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:30:02 -0400
commit1de335ad3f395ca6861085393ba366a9e3fb4a0d (patch)
treef1fdd326034e05177596851be6a7127615d81498 /tests/phpunit/includes/jobqueue/JobQueueTest.php
parent9c75fa8ff6d4d38ef552c00fef5969fb154765e8 (diff)
parentf6d65e533c62f6deb21342d4901ece24497b433e (diff)
Merge commit 'f6d65'
# Conflicts: # skins/ArchLinux/ArchLinux.php
Diffstat (limited to 'tests/phpunit/includes/jobqueue/JobQueueTest.php')
-rw-r--r--tests/phpunit/includes/jobqueue/JobQueueTest.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/phpunit/includes/jobqueue/JobQueueTest.php b/tests/phpunit/includes/jobqueue/JobQueueTest.php
index 69e40068..ea1a4f63 100644
--- a/tests/phpunit/includes/jobqueue/JobQueueTest.php
+++ b/tests/phpunit/includes/jobqueue/JobQueueTest.php
@@ -247,8 +247,13 @@ class JobQueueTest extends MediaWikiTestCase {
$this->assertNull( $queue->push( $this->newJob( 0, $root1 ) ), "Push worked ($desc)" );
}
$queue->deduplicateRootJob( $this->newJob( 0, $root1 ) );
- sleep( 1 ); // roo job timestamp will increase
- $root2 = Job::newRootJobParams( "nulljobspam:$id" ); // task ID/timestamp
+
+ $root2 = $root1;
+ # Add a second to UNIX epoch and format back to TS_MW
+ $root2_ts = strtotime( $root2['rootJobTimestamp'] );
+ $root2_ts++;
+ $root2['rootJobTimestamp'] = wfTimestamp( TS_MW, $root2_ts );
+
$this->assertNotEquals( $root1['rootJobTimestamp'], $root2['rootJobTimestamp'],
"Root job signatures have different timestamps." );
for ( $i = 0; $i < 5; ++$i ) {