Permalink
Browse files

VBID-1253 - increase timeout for collection sync

Change-Id: I3d0ae9ac8801811238f461a5fca27ff6fdb434a8
  • Loading branch information...
1 parent d9e8f57 commit 770caacdf95bb7505905483d58bd7c2ddea6f1ed Chris McBride committed Feb 6, 2013
Showing with 8 additions and 8 deletions.
  1. +2 −2 models/collection.coffee
  2. +1 −1 package.json
  3. +5 −5 test/models/collection_spec.coffee
View
@@ -16,12 +16,12 @@ class Collection extends Backbone.Collection
unless opts.from_handler
# the timeout is used to account for eventual consistency. This can be
# removed if we are using an ACID database.
- setTimeout((-> otherCol.fetch(update: true, from_handler: true)), 200)
+ setTimeout((-> otherCol.fetch(update: true, from_handler: true)), 300)
), this)
otherCol.on('sync add remove', ((model, resp, opts) =>
unless opts.from_handler
- setTimeout((=> @fetch(update: true, from_handler: true)), 200)
+ setTimeout((=> @fetch(update: true, from_handler: true)), 300)
), this)
View
@@ -1,6 +1,6 @@
{
"name": "quips",
- "version": "0.0.41",
+ "version": "0.0.42",
"dependencies": {
"coffee-script": "1.3.3",
"jqueryify2": "0.0.1",
@@ -53,7 +53,7 @@ describe 'Collection', ->
@mock1.add(new MockModel1())
@mock1.add(new MockModel1())
- @clock.tick(200)
+ @clock.tick(300)
expect(@mock1FetchCount).to.equal 1
expect(@mock2FetchCount).to.equal 2
@@ -65,7 +65,7 @@ describe 'Collection', ->
@mock1.syncTo(@mock2)
@mock2.remove([1])
@mock1.remove([2, 3])
- @clock.tick(200)
+ @clock.tick(300)
expect(@mock1FetchCount).to.equal 1
expect(@mock2FetchCount).to.equal 2
@@ -82,7 +82,7 @@ describe 'Collection', ->
@mock1.syncTo(@mock2)
model.save()
- @clock.tick(200)
+ @clock.tick(300)
expect(@mock1FetchCount).to.equal 0
expect(@mock2FetchCount).to.equal 1
@@ -96,7 +96,7 @@ describe 'Collection', ->
@mock1.syncTo(@mock2)
model.set(name: 'test')
- @clock.tick(200)
+ @clock.tick(300)
expect(@mock1FetchCount).to.equal 0
expect(@mock2FetchCount).to.equal 0
@@ -119,4 +119,4 @@ describe 'Collection', ->
for i in [1..100]
@modelSaved = false
model.save()
- @clock.tick(200)
+ @clock.tick(300)

0 comments on commit 770caac

Please sign in to comment.