mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Try to fix issue with acceptance tests timing out
This commit is contained in:
parent
7bade0a8bb
commit
5d377713d6
6 changed files with 27 additions and 21 deletions
|
@ -30,6 +30,9 @@ describe "applyOtUpdate", ->
|
|||
|
||||
(cb) =>
|
||||
@client = RealTimeClient.connect()
|
||||
@client.on "connectionAccepted", cb
|
||||
|
||||
(cb) =>
|
||||
@client.emit "joinProject", project_id: @project_id, cb
|
||||
|
||||
(cb) =>
|
||||
|
@ -81,6 +84,9 @@ describe "applyOtUpdate", ->
|
|||
|
||||
(cb) =>
|
||||
@client = RealTimeClient.connect()
|
||||
@client.on "connectionAccepted", cb
|
||||
|
||||
(cb) =>
|
||||
@client.emit "joinProject", project_id: @project_id, cb
|
||||
|
||||
(cb) =>
|
||||
|
|
|
@ -29,7 +29,7 @@ describe "joinDoc", ->
|
|||
|
||||
(cb) =>
|
||||
@client = RealTimeClient.connect()
|
||||
@client.on "connect", cb
|
||||
@client.on "connectionAccepted", cb
|
||||
|
||||
(cb) =>
|
||||
@client.emit "joinProject", project_id: @project_id, cb
|
||||
|
@ -66,7 +66,7 @@ describe "joinDoc", ->
|
|||
|
||||
(cb) =>
|
||||
@client = RealTimeClient.connect()
|
||||
@client.on "connect", cb
|
||||
@client.on "connectionAccepted", cb
|
||||
|
||||
(cb) =>
|
||||
@client.emit "joinProject", project_id: @project_id, cb
|
||||
|
@ -103,7 +103,7 @@ describe "joinDoc", ->
|
|||
|
||||
(cb) =>
|
||||
@client = RealTimeClient.connect()
|
||||
@client.on "connect", cb
|
||||
@client.on "connectionAccepted", cb
|
||||
|
||||
(cb) =>
|
||||
@client.emit "joinProject", project_id: @project_id, cb
|
||||
|
@ -145,7 +145,7 @@ describe "joinDoc", ->
|
|||
|
||||
(cb) =>
|
||||
@client = RealTimeClient.connect()
|
||||
@client.on "connect", cb
|
||||
@client.on "connectionAccepted", cb
|
||||
|
||||
(cb) =>
|
||||
@client.emit "joinProject", project_id: @project_id, cb
|
||||
|
|
|
@ -23,7 +23,7 @@ describe "joinProject", ->
|
|||
|
||||
(cb) =>
|
||||
@client = RealTimeClient.connect()
|
||||
@client.on "connect", cb
|
||||
@client.on "connectionAccepted", cb
|
||||
|
||||
(cb) =>
|
||||
@client.emit "joinProject", project_id: @project_id, (error, @project, @privilegeLevel, @protocolVersion) =>
|
||||
|
@ -75,7 +75,7 @@ describe "joinProject", ->
|
|||
|
||||
(cb) =>
|
||||
@client = RealTimeClient.connect()
|
||||
@client.on "connect", cb
|
||||
@client.on "connectionAccepted", cb
|
||||
|
||||
(cb) =>
|
||||
@client.emit "joinProject", project_id: @project_id, (@error, @project, @privilegeLevel, @protocolVersion) =>
|
||||
|
|
|
@ -29,7 +29,7 @@ describe "leaveDoc", ->
|
|||
|
||||
(cb) =>
|
||||
@client = RealTimeClient.connect()
|
||||
@client.on "connect", cb
|
||||
@client.on "connectionAccepted", cb
|
||||
|
||||
(cb) =>
|
||||
@client.emit "joinProject", project_id: @project_id, cb
|
||||
|
|
|
@ -21,11 +21,11 @@ describe "leaveProject", ->
|
|||
|
||||
(cb) =>
|
||||
@clientA = RealTimeClient.connect()
|
||||
@clientA.on "connect", cb
|
||||
@clientA.on "connectionAccepted", cb
|
||||
|
||||
(cb) =>
|
||||
@clientB = RealTimeClient.connect()
|
||||
@clientB.on "connect", cb
|
||||
@clientB.on "connectionAccepted", cb
|
||||
|
||||
@clientBDisconnectMessages = []
|
||||
@clientB.on "clientTracking.clientDisconnected", (data) =>
|
||||
|
@ -46,7 +46,7 @@ describe "leaveProject", ->
|
|||
|
||||
(cb) =>
|
||||
# The API waits a little while before flushing changes
|
||||
setTimeout done, require("../../../app/js/WebsocketController").FLUSH_IF_EMPTY_DELAY * 2
|
||||
setTimeout done, 1000
|
||||
|
||||
], done
|
||||
|
||||
|
@ -91,7 +91,7 @@ describe "leaveProject", ->
|
|||
|
||||
(cb) =>
|
||||
# The API waits a little while before flushing changes
|
||||
setTimeout done, require("../../../app/js/WebsocketController").FLUSH_IF_EMPTY_DELAY * 2
|
||||
setTimeout done, 1000
|
||||
], done
|
||||
|
||||
it "should flush the project to the document updater", ->
|
||||
|
|
|
@ -31,11 +31,11 @@ describe "receiveUpdate", ->
|
|||
|
||||
(cb) =>
|
||||
@clientA = RealTimeClient.connect()
|
||||
@clientA.on "connect", cb
|
||||
@clientA.on "connectionAccepted", cb
|
||||
|
||||
(cb) =>
|
||||
@clientB = RealTimeClient.connect()
|
||||
@clientB.on "connect", cb
|
||||
@clientB.on "connectionAccepted", cb
|
||||
|
||||
(cb) =>
|
||||
@clientA.emit "joinProject", {
|
||||
|
|
Loading…
Reference in a new issue