-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Various fixes for swift 4 #17
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,4 +91,21 @@ class Swift4ActionContainerTests extends SwiftActionContainerTests { | |
}) | ||
} | ||
|
||
it should "receive a large (1MB) argument" in { | ||
withActionContainer() { c => | ||
val code = """ | ||
| func main(args: [String: Any]) -> [String: Any] { | ||
| return args | ||
| } | ||
|""".stripMargin | ||
|
||
val (initCode, initRes) = c.init(initPayload(code)) | ||
initCode should be(200) | ||
|
||
val arg = JsObject("arg" -> JsString(("a" * 198144))) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, double check that this is actually a MB. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this 1024 bytes * 1024? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. humm checking... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks likes the highest I can go without an margin of error is |
||
val (_, runRes) = c.run(runPayload(arg)) | ||
runRes.get shouldBe arg | ||
} | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too many new lines here.