1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-23 05:44:53 +00:00

Fix feed timeout test; improves #113

This commit is contained in:
J. King 2017-12-16 17:21:23 -05:00
parent 6848f154c0
commit 415f7fd385
2 changed files with 7 additions and 7 deletions

View file

@ -54,12 +54,6 @@ class TestFeedFetching extends Test\AbstractTest {
new Feed(null, $this->base."Fetching/EndlessLoop?i=0"); new Feed(null, $this->base."Fetching/EndlessLoop?i=0");
} }
public function testHandleATimeout() {
Arsse::$conf->fetchTimeout = 1;
$this->assertException("timeout", "Feed");
new Feed(null, $this->base."Fetching/Timeout");
}
public function testHandleAnOverlyLargeFeed() { public function testHandleAnOverlyLargeFeed() {
Arsse::$conf->fetchSizeLimit = 512; Arsse::$conf->fetchSizeLimit = 512;
$this->assertException("maxSize", "Feed"); $this->assertException("maxSize", "Feed");
@ -70,4 +64,10 @@ class TestFeedFetching extends Test\AbstractTest {
$this->assertException("invalidCertificate", "Feed"); $this->assertException("invalidCertificate", "Feed");
new Feed(null, "https://localhost:8000/"); new Feed(null, "https://localhost:8000/");
} }
public function testHandleATimeout() {
Arsse::$conf->fetchTimeout = 1;
$this->assertException("timeout", "Feed");
new Feed(null, $this->base."Fetching/Timeout");
}
} }

View file

@ -1,5 +1,5 @@
<?php <?php
sleep(5); usleep(1.05 * 1000000);
return [ return [
'code' => 404, 'code' => 404,
'cache' => false, 'cache' => false,