Skip to content

Commit

Permalink
Adding timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
yasserf committed Jun 23, 2016
1 parent 53d1ee9 commit be41939
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions test-e2e/specs/record-redis-permissionSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,11 @@ describe( 'record permissions with internal cache', function() {
rec.set({ value: 3 });
setTimeout(function(){
expect( clientAErrors.length ).toBe( 1 );
expect( clientAErrors[ 0 ][ 1 ] ).toBe( 'MESSAGE_DENIED' );
if( clientAErrors[ 0 ] ) {
expect( clientAErrors[ 0 ][ 1 ] ).toBe( 'MESSAGE_DENIED' );
}
done();
}, 400 );
}, 2000 );
});

it( 'works when setting different records in quick mixed succession', function( done ) {
Expand All @@ -205,13 +207,17 @@ describe( 'record permissions with internal cache', function() {

setTimeout(function(){
expect( clientAErrors.length ).toBe( 1 );
expect( clientAErrors[ 0 ][ 1 ] ).toBe( 'MESSAGE_DENIED' );
if( clientAErrors[ 0 ] ) {
expect( clientAErrors[ 0 ][ 1 ] ).toBe( 'MESSAGE_DENIED' );
}

expect( clientBErrors.length ).toBe( 1 );
expect( clientBErrors[ 0 ][ 1 ] ).toBe( 'MESSAGE_DENIED' );
if( clientBErrors[ 0 ] ) {
expect( clientBErrors[ 0 ][ 1 ] ).toBe( 'MESSAGE_DENIED' );
}

done();
}, 400 );
}, 2000 );
});
});

Expand Down

0 comments on commit be41939

Please sign in to comment.