Skip to content

Commit abe2411

Browse files
committed
Trying to repair broken build
1 parent bb13ca3 commit abe2411

4 files changed

Lines changed: 37 additions & 7 deletions

File tree

.travis.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,22 @@ php:
3636
- 7.3
3737
- 7.4
3838
- 8.0
39-
- hhvm
4039

4140
jobs:
4241
fast_finish: true
4342
allow_failures:
44-
# - php: nightly
45-
- php: hhvm
46-
43+
- php: nightly
44+
# - php: hhvm
45+
include:
46+
- dist: trusty
47+
php: 7.3
48+
- dist: trusty
49+
php: 7.4
50+
exclude:
51+
- dist: bionic
52+
php: 7.3
53+
- dist: bionic
54+
php: 7.4
4755
install:
4856
- ./bin/ci/install_dependencies.sh
4957

tests/AbstractProxy.test.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
chdir(__DIR__);
1414
require_once __DIR__ . '/../vendor/autoload.php';
1515
$testHelper = new TestHelper('phpfastcacheAbstractProxy class');
16+
var_dump(getopt('d:p:', []));exit;
1617
$defaultDriver = (!empty($argv[1]) ? ucfirst($argv[1]) : 'Files');
1718

1819

@@ -48,4 +49,4 @@ public function __construct($driver = '', $config = null)
4849
$testHelper->printPassText('$driverInstance->getItem() returned a valid class that implements ExtendedCacheItemInterface: ' . get_class($driverInstance));
4950
}
5051

51-
$testHelper->terminateTest();
52+
$testHelper->terminateTest();

tests/Couchdb.test.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,23 @@
66
*/
77

88
use Phpfastcache\CacheManager;
9+
use Phpfastcache\Drivers\Couchdb\Config as CouchdbConfig;
10+
use Phpfastcache\Exceptions\PhpfastcacheDriverConnectException;
911
use Phpfastcache\Exceptions\PhpfastcacheDriverException;
1012
use Phpfastcache\Helper\TestHelper;
1113

1214
chdir(__DIR__);
1315
require_once __DIR__ . '/../vendor/autoload.php';
1416
$testHelper = new TestHelper('Couchdb driver');
15-
$cacheInstance = CacheManager::getInstance('Couchdb');
17+
$config = new CouchdbConfig();
1618

19+
try{
20+
$cacheInstance = CacheManager::getInstance('Couchdb', $config);
21+
} catch (PhpfastcacheDriverConnectException $e){
22+
$config->setUsername('admin');
23+
$config->setPassword('travis');
24+
$cacheInstance = CacheManager::getInstance('Couchdb', $config);
25+
}
1726

1827
$cacheKey = str_shuffle(uniqid('pfc', true));
1928
$cacheValue = str_shuffle(uniqid('pfc', true));

tests/Riak.test.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,19 @@
1212
chdir(__DIR__);
1313
require_once __DIR__ . '/../vendor/autoload.php';
1414
$testHelper = new TestHelper('Riak driver');
15-
$cacheInstance = CacheManager::getInstance('Riak');
15+
16+
try{
17+
$cacheInstance = CacheManager::getInstance('Riak');
18+
} catch (\Basho\Riak\Exception $e){
19+
/**
20+
* Riak is only available on Trusty dist.
21+
* @see https://docs.travis-ci.com/user/database-setup/#riak
22+
*/
23+
if(stripos($e->getMessage(), 'Could not contact Riak Server') !== false){
24+
$testHelper->printSkipText('Riak server unavailable: ' . $e->getMessage());
25+
$testHelper->terminateTest();
26+
}
27+
}
1628

1729

1830
$cacheKey = str_shuffle(uniqid('pfc', true));

0 commit comments

Comments
 (0)