Skip to content
Snippets Groups Projects
Commit 7a3d7e9a authored by Dominik Jall's avatar Dominik Jall
Browse files

up socket timeout of python action to 60 seconds

up to 2 minutes

test url openwhisk.ng.bluemix.net/api/v1

test url is now openwhisk.ng.bluemix.net/api/v1
parent dd24bde7
No related branches found
No related tags found
No related merge requests found
...@@ -163,12 +163,14 @@ class PythonActionContainerTests extends BasicActionRunnerTests with WskActorSys ...@@ -163,12 +163,14 @@ class PythonActionContainerTests extends BasicActionRunnerTests with WskActorSys
|from scrapy.item import Item, Field |from scrapy.item import Item, Field
|import simplejson as json |import simplejson as json
|from twisted.internet import protocol, reactor, endpoints |from twisted.internet import protocol, reactor, endpoints
|import socket
| |
|def main(args): |def main(args):
| socket.setdefaulttimeout(120)
| b = BeautifulSoup('<html><head><title>python action test</title></head></html>', 'html.parser') | b = BeautifulSoup('<html><head><title>python action test</title></head></html>', 'html.parser')
| h = httplib2.Http().request('https://httpbin.org/status/201')[0] | h = httplib2.Http().request('https://openwhisk.ng.bluemix.net/api/v1')[0]
| t = parse('2016-02-22 11:59:00 EST') | t = parse('2016-02-22 11:59:00 EST')
| r = requests.get('https://httpbin.org/status/418') | r = requests.get('https://openwhisk.ng.bluemix.net/api/v1')
| j = json.dumps({'foo':'bar'}, separators = (',', ':')) | j = json.dumps({'foo':'bar'}, separators = (',', ':'))
| |
| return { | return {
...@@ -190,11 +192,11 @@ class PythonActionContainerTests extends BasicActionRunnerTests with WskActorSys ...@@ -190,11 +192,11 @@ class PythonActionContainerTests extends BasicActionRunnerTests with WskActorSys
runRes shouldBe defined runRes shouldBe defined
runRes should be(Some(JsObject( runRes should be(Some(JsObject(
"bs4" -> "<title>python action test</title>".toJson, "bs4" -> "<title>python action test</title>".toJson,
"httplib2" -> 201.toJson, "httplib2" -> 200.toJson,
"dateutil" -> "Monday".toJson, "dateutil" -> "Monday".toJson,
"lxml" -> "root".toJson, "lxml" -> "root".toJson,
"json" -> JsObject("foo" -> "bar".toJson).compactPrint.toJson, "json" -> JsObject("foo" -> "bar".toJson).compactPrint.toJson,
"request" -> 418.toJson))) "request" -> 200.toJson)))
} }
checkStreams(out, err, { checkStreams(out, err, {
......
...@@ -103,7 +103,7 @@ class Swift3ActionContainerTests extends SwiftActionContainerTests { ...@@ -103,7 +103,7 @@ class Swift3ActionContainerTests extends SwiftActionContainerTests {
initCode should be(200) initCode should be(200)
val argss = List( val argss = List(
JsObject("getUrl" -> JsString("https://httpbin.org/get"))) JsObject("getUrl" -> JsString("https://openwhisk.ng.bluemix.net/api/v1")))
for (args <- argss) { for (args <- argss) {
val (runCode, out) = c.run(runPayload(args)) val (runCode, out) = c.run(runPayload(args))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment