Skip to content

Commit 689861e

Browse files
jmikolaalcaeus
andauthored
Test against PHPC 1.8.0 and server 4.4.0 on Travis CI (#774)
* Test against PHPC 1.8.0 and server 4.4.0 on Travis CI Also bumps older server versions to their latest patch release * Work around missing error labels in fail points This commit is a workaround around fail points not including the ResumableChangeStreamError on replica sets. This breaks retrying changestream operations Co-authored-by: Andreas Braun <[email protected]>
1 parent 3efd3ea commit 689861e

File tree

2 files changed

+23
-11
lines changed

2 files changed

+23
-11
lines changed

.travis.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ cache:
2222

2323
env:
2424
global:
25-
- DRIVER_VERSION=1.8.0RC1
25+
- DRIVER_VERSION=1.8.0
2626
- SERVER_DISTRO=enterprise-ubuntu1604
27-
- SERVER_VERSION=4.2.0
27+
- SERVER_VERSION=4.4.0
2828
- DEPLOYMENT=STANDALONE
2929
- COMPOSER_OPTIONS=
3030

@@ -84,22 +84,26 @@ jobs:
8484
- stage: Test
8585
php: "7.0"
8686
env:
87-
- SERVER_VERSION=3.4.21
87+
- SERVER_VERSION=3.4.24
8888
- DEPLOYMENT=STANDALONE_OLD
8989
- stage: Test
9090
php: "7.0"
9191
env:
92-
- SERVER_VERSION=3.6.13
92+
- SERVER_VERSION=3.6.19
9393
- stage: Test
9494
php: "7.3"
9595
env:
96-
- SERVER_VERSION=4.0.12
97-
98-
# Test upcoming server version
96+
- SERVER_VERSION=4.0.19
9997
- stage: Test
10098
php: "7.3"
10199
env:
102-
- SERVER_VERSION=4.3.4
100+
- SERVER_VERSION=4.2.8
101+
102+
# Test upcoming server version
103+
#- stage: Test
104+
# php: "7.3"
105+
# env:
106+
# - SERVER_VERSION=4.5.0
103107

104108
# Test other server configurations
105109
- stage: Test

tests/Operation/WatchFunctionalTest.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,11 @@ public function testResumeRepeatsOriginalPipelineAndOptions()
12041204
$this->configureFailPoint([
12051205
'configureFailPoint' => 'failCommand',
12061206
'mode' => ['times' => 1],
1207-
'data' => ['failCommands' => ['getMore'], 'errorCode' => self::NOT_MASTER],
1207+
'data' => [
1208+
'failCommands' => ['getMore'],
1209+
'errorCode' => self::NOT_MASTER,
1210+
'errorLabels' => ['ResumableChangeStreamError'],
1211+
],
12081212
]);
12091213

12101214
(new CommandObserver())->observe(
@@ -1551,12 +1555,16 @@ function (array $event) use (&$commands) {
15511555
$this->assertEmpty($commands);
15521556
}
15531557

1554-
private function forceChangeStreamResume(array $commands = ['getMore'], int $errorCode = self::NOT_MASTER)
1558+
private function forceChangeStreamResume()
15551559
{
15561560
$this->configureFailPoint([
15571561
'configureFailPoint' => 'failCommand',
15581562
'mode' => ['times' => 1],
1559-
'data' => ['failCommands' => $commands, 'errorCode' => $errorCode],
1563+
'data' => [
1564+
'failCommands' => ['getMore'],
1565+
'errorCode' => self::NOT_MASTER,
1566+
'errorLabels' => ['ResumableChangeStreamError'],
1567+
],
15601568
]);
15611569
}
15621570

0 commit comments

Comments
 (0)