Skip to content

Commit

Permalink
fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Pekhota committed Sep 14, 2021
1 parent 77d7f7a commit 3e66fb9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/Jaeger/ThriftUdpTransportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,18 @@ public function testClose()
$this->transport->write('hello');
}

public function testExceptions() {
public function testException() {
$this->transport->open();

$this->expectException(TTransportException::class);
$this->expectExceptionMessage("socket_write failed: [code - 40] Message too long");

$msgRegEx = "/socket_write failed: \[code - \d+\] Message too long/";
if (method_exists($this, "expectExceptionMessageRegExp")) {
$this->expectExceptionMessageRegExp($msgRegEx);
} else {
$this->expectExceptionMessageMatches($msgRegEx);
}

$this->transport->write(str_repeat("some string", 10000));
}
}

0 comments on commit 3e66fb9

Please sign in to comment.