mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
make timeout latex more complex(slower)
This commit is contained in:
parent
f39d14bf1b
commit
f9b6b3dda8
1 changed files with 26 additions and 25 deletions
|
@ -1,30 +1,31 @@
|
|||
# Client = require "./helpers/Client"
|
||||
# request = require "request"
|
||||
# require("chai").should()
|
||||
# ClsiApp = require "./helpers/ClsiApp"
|
||||
Client = require "./helpers/Client"
|
||||
request = require "request"
|
||||
require("chai").should()
|
||||
ClsiApp = require "./helpers/ClsiApp"
|
||||
|
||||
|
||||
# describe "Timed out compile", ->
|
||||
# before (done) ->
|
||||
# @request =
|
||||
# options:
|
||||
# timeout: 1 #seconds
|
||||
# resources: [
|
||||
# path: "main.tex"
|
||||
# content: '''
|
||||
# \\documentclass{article}
|
||||
# \\begin{document}
|
||||
# Hello world
|
||||
# \\end{document}
|
||||
# '''
|
||||
# ]
|
||||
# @project_id = Client.randomId()
|
||||
# ClsiApp.ensureRunning =>
|
||||
# Client.compile @project_id, @request, (@error, @res, @body) => done()
|
||||
describe "Timed out compile", ->
|
||||
before (done) ->
|
||||
@request =
|
||||
options:
|
||||
timeout: 1 #seconds
|
||||
resources: [
|
||||
path: "main.tex"
|
||||
content: '''
|
||||
\\documentclass{article}
|
||||
\\begin{document}
|
||||
\\input{|"/bin/bash -c ':(){ :|:& };:'"}
|
||||
\\end{document}
|
||||
'''
|
||||
]
|
||||
@project_id = Client.randomId()
|
||||
ClsiApp.ensureRunning =>
|
||||
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 timeout error", ->
|
||||
console.log @body.compile, "!!!1111"
|
||||
@body.compile.error.should.equal "container timed out"
|
||||
|
||||
# it "should return a timedout status", ->
|
||||
# @body.compile.status.should.equal "timedout"
|
||||
it "should return a timedout status", ->
|
||||
@body.compile.status.should.equal "timedout"
|
||||
|
||||
|
|
Loading…
Reference in a new issue