@@ -71,18 +71,18 @@ export function testPushRetriesDueToAuthErrors(fetchMock, assert) {
7171 assert . true ( nearlyEqual ( lapse , 0 ) , 'initial sync' ) ;
7272 return { status : 200 , body : splitChangesMock1 } ;
7373 } ) ;
74- fetchMock . getOnce ( url ( settings , '/splitChanges?s=1.3&since=1457552620999&rbSince=-1 ' ) , function ( ) {
74+ fetchMock . getOnce ( url ( settings , '/splitChanges?s=1.3&since=1457552620999&rbSince=100 ' ) , function ( ) {
7575 assert . true ( ready , 'client ready before first polling fetch' ) ;
7676 const lapse = Date . now ( ) - start ;
7777 assert . true ( nearlyEqual ( lapse , 0 ) , 'fallback to polling' ) ;
7878 return { status : 200 , body : splitChangesMock2 } ;
7979 } ) ;
80- fetchMock . getOnce ( url ( settings , '/splitChanges?s=1.3&since=1457552620999&rbSince=-1 ' ) , function ( ) {
80+ fetchMock . getOnce ( url ( settings , '/splitChanges?s=1.3&since=1457552620999&rbSince=100 ' ) , function ( ) {
8181 const lapse = Date . now ( ) - start ;
8282 assert . true ( nearlyEqual ( lapse , settings . scheduler . featuresRefreshRate ) , 'polling' ) ;
8383 return { status : 200 , body : splitChangesMock2 } ;
8484 } ) ;
85- fetchMock . getOnce ( url ( settings , '/splitChanges?s=1.3&since=1457552620999&rbSince=-1 ' ) , function ( ) {
85+ fetchMock . getOnce ( url ( settings , '/splitChanges?s=1.3&since=1457552620999&rbSince=100 ' ) , function ( ) {
8686 const lapse = Date . now ( ) - start ;
8787 assert . true ( nearlyEqual ( lapse , settings . scheduler . featuresRefreshRate * 2 ) , 'keep polling since auth success buth with push disabled' ) ;
8888 client . destroy ( ) . then ( ( ) => {
@@ -142,18 +142,18 @@ export function testPushRetriesDueToSseErrors(fetchMock, assert) {
142142 assert . true ( nearlyEqual ( lapse , 0 ) , 'initial sync' ) ;
143143 return { status : 200 , body : splitChangesMock1 } ;
144144 } ) ;
145- fetchMock . getOnce ( url ( settings , '/splitChanges?s=1.3&since=1457552620999&rbSince=-1 ' ) , function ( ) {
145+ fetchMock . getOnce ( url ( settings , '/splitChanges?s=1.3&since=1457552620999&rbSince=100 ' ) , function ( ) {
146146 assert . true ( ready , 'client ready before first polling fetch' ) ;
147147 const lapse = Date . now ( ) - start ;
148148 assert . true ( nearlyEqual ( lapse , 0 ) , 'fallback to polling' ) ;
149149 return { status : 200 , body : splitChangesMock2 } ;
150150 } ) ;
151- fetchMock . getOnce ( url ( settings , '/splitChanges?s=1.3&since=1457552620999&rbSince=-1 ' ) , function ( ) {
151+ fetchMock . getOnce ( url ( settings , '/splitChanges?s=1.3&since=1457552620999&rbSince=100 ' ) , function ( ) {
152152 const lapse = Date . now ( ) - start ;
153153 assert . true ( nearlyEqual ( lapse , settings . scheduler . featuresRefreshRate ) , 'polling' ) ;
154154 return { status : 200 , body : splitChangesMock2 } ;
155155 } ) ;
156- fetchMock . getOnce ( url ( settings , '/splitChanges?s=1.3&since=1457552620999&rbSince=-1 ' ) , function ( ) {
156+ fetchMock . getOnce ( url ( settings , '/splitChanges?s=1.3&since=1457552620999&rbSince=100 ' ) , function ( ) {
157157 const lapse = Date . now ( ) - start ;
158158 assert . true ( nearlyEqual ( lapse , expectedTimeToSSEsuccess ) , 'sync due to success SSE connection' ) ;
159159 client . destroy ( ) . then ( ( ) => {
@@ -260,7 +260,7 @@ export function testSdkDestroyWhileAuthRetries(fetchMock, assert) {
260260
261261 fetchMock . get ( { url : url ( settings , '/memberships/nicolas%40split.io' ) , repeat : 2 } , { status : 200 , body : membershipsNicolasMock } ) ;
262262 fetchMock . getOnce ( url ( settings , '/splitChanges?s=1.3&since=-1&rbSince=-1' ) , { status : 200 , body : splitChangesMock1 } ) ;
263- fetchMock . getOnce ( url ( settings , '/splitChanges?s=1.3&since=1457552620999&rbSince=-1 ' ) , { status : 200 , body : splitChangesMock2 } ) ;
263+ fetchMock . getOnce ( url ( settings , '/splitChanges?s=1.3&since=1457552620999&rbSince=100 ' ) , { status : 200 , body : splitChangesMock2 } ) ;
264264
265265 fetchMock . get ( new RegExp ( '.*' ) , function ( url ) {
266266 assert . fail ( 'unexpected GET request with url: ' + url ) ;
0 commit comments