Skip to content

Commit 7b5e2de

Browse files
committed
chore: add test for ExpiredIteratorException
though it will only work on a machine with oldShardState.json which I'm currently loath to share as is. fix #9
1 parent 45b474b commit 7b5e2de

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@ node_modules/*
3030

3131
index2.js
3232
test2.js
33-
shardState.json*
33+
shardState.json
34+
oldShardState.json
3435
playground

test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ test('reports the correct stream of changes', async t => {
4040
])
4141
})
4242

43+
// this test will only work if you have a proper shardState set a side
44+
test.skip('ExpiredIteratorException', async t => {
45+
const shardState = require('./oldShardState.json')
46+
const { ddbStream } = t.context
47+
ddbStream.setShardState(shardState)
48+
await t.notThrowsAsync(ddbStream.fetchStreamState())
49+
})
50+
4351
test.beforeEach(async t => {
4452

4553
t.context = {

0 commit comments

Comments
 (0)