Skip to content

Commit 0cb69f9

Browse files
committed
Make cancellation more predictable by requiring cancellation support
1 parent 8cad2ea commit 0cb69f9

4 files changed

Lines changed: 1 addition & 13 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"php": ">=5.3.0",
88
"react/cache": "~0.4.0|~0.3.0",
99
"react/socket": "~0.4.0|~0.3.0",
10-
"react/promise": "~2.0|~1.1"
10+
"react/promise": "~2.1|~1.2"
1111
},
1212
"autoload": {
1313
"psr-4": { "React\\Dns\\": "src" }

tests/FunctionalResolverTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ public function testResolveInvalidRejects()
3535

3636
public function testResolveCancelledRejectsImmediately()
3737
{
38-
if (!interface_exists('React\Promise\CancellablePromiseInterface')) {
39-
$this->markTestSkipped();
40-
}
41-
4238
$promise = $this->resolver->resolve('google.com');
4339
$promise->then($this->expectCallableNever(), $this->expectCallableOnce());
4440
$promise->cancel();

tests/Query/ExecutorTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ public function resolveShouldCreateTcpRequestIfRequestIsLargerThan512Bytes()
6464
/** @test */
6565
public function resolveShouldCloseConnectionWhenCancelled()
6666
{
67-
if (!interface_exists('React\Promise\CancellablePromiseInterface')) {
68-
$this->markTestSkipped('Skipped missing CancellablePromiseInterface');
69-
}
70-
7167
$conn = $this->createConnectionMock();
7268
$conn->expects($this->once())->method('close');
7369

tests/Query/RetryExecutorTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,6 @@ public function queryShouldForwardNonTimeoutErrors()
133133
*/
134134
public function queryShouldCancelQueryOnCancel()
135135
{
136-
if (!interface_exists('React\Promise\CancellablePromiseInterface')) {
137-
$this->markTestSkipped('Skipped missing CancellablePromiseInterface');
138-
}
139-
140136
$cancelled = 0;
141137

142138
$executor = $this->createExecutorMock();

0 commit comments

Comments
 (0)