Skip to content

Commit b884138

Browse files
committed
Fix test case for expire
Forwardport of #1074. #1072 was missing Promise.resolve before using delay(20) and causing Travis to fail on 2.x. This PR makes the test code consistent on both master and 2.x.
1 parent 68294ba commit b884138

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/kvao/expire.suite.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ module.exports = function(dataSourceFactory, connectorCapabilities) {
3636
});
3737

3838
it('returns error when expiring a key that has expired', function() {
39-
return CacheItem.set('expired-key', 'a-value', 1).delay(20)
39+
return Promise.resolve(CacheItem.set('expired-key', 'a-value', 1))
40+
.delay(20)
4041
.then(function() { return CacheItem.expire('expired-key', 1000); })
4142
.then(
4243
function() { throw new Error('expire() should have failed'); },

0 commit comments

Comments
 (0)