aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/jobqueue/JobQueueTest.php
diff options
context:
space:
mode:
authorAaron Schulz <aschulz@wikimedia.org>2014-04-16 10:51:11 -0700
committerAaron Schulz <aschulz@wikimedia.org>2014-04-16 11:22:31 -0700
commit94c37ffb960b2004459389dd1c75d2e476af188b (patch)
tree5a4eeab5929ea81cb9294791215fc54dc9980aed /tests/phpunit/includes/jobqueue/JobQueueTest.php
parent71fc56f11bdb1de5af9d7ac6abbed45b5b39aee7 (diff)
downloadmediawikicore-94c37ffb960b2004459389dd1c75d2e476af188b.tar.gz
mediawikicore-94c37ffb960b2004459389dd1c75d2e476af188b.zip
Revert "Revert "Removed useless JobQueue return values""
Made the obvious update to a caller missed in the change. This reverts commit c76d5a95c1dd1c3086461feae8bc1c0b688bde1e. Change-Id: I67400ba5b9fc7de16c9f9d5075c488c5e58cea9e
Diffstat (limited to 'tests/phpunit/includes/jobqueue/JobQueueTest.php')
-rw-r--r--tests/phpunit/includes/jobqueue/JobQueueTest.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/phpunit/includes/jobqueue/JobQueueTest.php b/tests/phpunit/includes/jobqueue/JobQueueTest.php
index 33194901314e..70374dc651f5 100644
--- a/tests/phpunit/includes/jobqueue/JobQueueTest.php
+++ b/tests/phpunit/includes/jobqueue/JobQueueTest.php
@@ -108,8 +108,8 @@ class JobQueueTest extends MediaWikiTestCase {
$this->assertEquals( 0, $queue->getSize(), "Queue is empty ($desc)" );
$this->assertEquals( 0, $queue->getAcquiredCount(), "Queue is empty ($desc)" );
- $this->assertTrue( $queue->push( $this->newJob() ), "Push worked ($desc)" );
- $this->assertTrue( $queue->batchPush( array( $this->newJob() ) ), "Push worked ($desc)" );
+ $this->assertNull( $queue->push( $this->newJob() ), "Push worked ($desc)" );
+ $this->assertNull( $queue->batchPush( array( $this->newJob() ) ), "Push worked ($desc)" );
$this->assertFalse( $queue->isEmpty(), "Queue is not empty ($desc)" );
@@ -157,7 +157,7 @@ class JobQueueTest extends MediaWikiTestCase {
$queue->flushCaches();
$this->assertEquals( 0, $queue->getAcquiredCount(), "Active job count ($desc)" );
- $this->assertTrue( $queue->batchPush( array( $this->newJob(), $this->newJob() ) ),
+ $this->assertNull( $queue->batchPush( array( $this->newJob(), $this->newJob() ) ),
"Push worked ($desc)" );
$this->assertFalse( $queue->isEmpty(), "Queue is not empty ($desc)" );
@@ -183,7 +183,7 @@ class JobQueueTest extends MediaWikiTestCase {
$this->assertEquals( 0, $queue->getSize(), "Queue is empty ($desc)" );
$this->assertEquals( 0, $queue->getAcquiredCount(), "Queue is empty ($desc)" );
- $this->assertTrue(
+ $this->assertNull(
$queue->batchPush(
array( $this->newDedupedJob(), $this->newDedupedJob(), $this->newDedupedJob() )
),
@@ -195,7 +195,7 @@ class JobQueueTest extends MediaWikiTestCase {
$this->assertEquals( 1, $queue->getSize(), "Queue size is correct ($desc)" );
$this->assertEquals( 0, $queue->getAcquiredCount(), "No jobs active ($desc)" );
- $this->assertTrue(
+ $this->assertNull(
$queue->batchPush(
array( $this->newDedupedJob(), $this->newDedupedJob(), $this->newDedupedJob() )
),
@@ -244,7 +244,7 @@ class JobQueueTest extends MediaWikiTestCase {
$id = wfRandomString( 32 );
$root1 = Job::newRootJobParams( "nulljobspam:$id" ); // task ID/timestamp
for ( $i = 0; $i < 5; ++$i ) {
- $this->assertTrue( $queue->push( $this->newJob( 0, $root1 ) ), "Push worked ($desc)" );
+ $this->assertNull( $queue->push( $this->newJob( 0, $root1 ) ), "Push worked ($desc)" );
}
$queue->deduplicateRootJob( $this->newJob( 0, $root1 ) );
sleep( 1 ); // roo job timestamp will increase
@@ -252,7 +252,7 @@ class JobQueueTest extends MediaWikiTestCase {
$this->assertNotEquals( $root1['rootJobTimestamp'], $root2['rootJobTimestamp'],
"Root job signatures have different timestamps." );
for ( $i = 0; $i < 5; ++$i ) {
- $this->assertTrue( $queue->push( $this->newJob( 0, $root2 ) ), "Push worked ($desc)" );
+ $this->assertNull( $queue->push( $this->newJob( 0, $root2 ) ), "Push worked ($desc)" );
}
$queue->deduplicateRootJob( $this->newJob( 0, $root2 ) );
@@ -296,7 +296,7 @@ class JobQueueTest extends MediaWikiTestCase {
$this->assertEquals( 0, $queue->getAcquiredCount(), "Queue is empty ($desc)" );
for ( $i = 0; $i < 10; ++$i ) {
- $this->assertTrue( $queue->push( $this->newJob( $i ) ), "Push worked ($desc)" );
+ $this->assertNull( $queue->push( $this->newJob( $i ) ), "Push worked ($desc)" );
}
for ( $i = 0; $i < 10; ++$i ) {