mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
28 lines
669 B
CoffeeScript
28 lines
669 B
CoffeeScript
Client = require "./helpers/Client"
|
|
request = require "request"
|
|
require("chai").should()
|
|
|
|
describe "Timed out compile", ->
|
|
before (done) ->
|
|
@request =
|
|
options:
|
|
timeout: 1 #seconds
|
|
resources: [
|
|
path: "main.tex"
|
|
content: '''
|
|
\\documentclass{article}
|
|
\\begin{document}
|
|
Hello world
|
|
\\input{|"sleep 10"}
|
|
\\end{document}
|
|
'''
|
|
]
|
|
@project_id = Client.randomId()
|
|
Client.compile @project_id, @request, (@error, @res, @body) => done()
|
|
|
|
it "should return a timeout error", ->
|
|
@body.compile.error.should.equal "container timed out"
|
|
|
|
it "should return a timedout status", ->
|
|
@body.compile.status.should.equal "timedout"
|
|
|