From be419390c443331967b44f9d2afb4ccaacf4b380 Mon Sep 17 00:00:00 2001 From: Yasser Fadl Date: Thu, 23 Jun 2016 16:21:09 +0200 Subject: [PATCH] Adding timeout --- test-e2e/specs/record-redis-permissionSpec.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/test-e2e/specs/record-redis-permissionSpec.js b/test-e2e/specs/record-redis-permissionSpec.js index 83da741d9..200cf3163 100644 --- a/test-e2e/specs/record-redis-permissionSpec.js +++ b/test-e2e/specs/record-redis-permissionSpec.js @@ -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 ) { @@ -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 ); }); });