From d59bfb3f1acf80e4daec4bbb094bc9ba0f50116e Mon Sep 17 00:00:00 2001 From: linussieweke Date: Wed, 2 Jun 2021 12:51:34 +0200 Subject: [PATCH] fixed stress test --- test/stresstest/config.ini | 2 +- test/stresstest/websocketconnector.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/test/stresstest/config.ini b/test/stresstest/config.ini index 010d178fa..d6498fa70 100644 --- a/test/stresstest/config.ini +++ b/test/stresstest/config.ini @@ -1,4 +1,4 @@ [vss] server=ws://localhost:8090 -jwttoken=jwt.token +jwttoken=../../kuksa_certificates/jwt/all-read-write.json.token timout=0.1 diff --git a/test/stresstest/websocketconnector.py b/test/stresstest/websocketconnector.py index 295502cde..881ecdc95 100644 --- a/test/stresstest/websocketconnector.py +++ b/test/stresstest/websocketconnector.py @@ -12,7 +12,6 @@ from threading import Thread import websockets - class vssclient: def __init__(self, uri, token): self.uri=uri @@ -42,7 +41,7 @@ async def connect(self, uri,loop): async def authorize(self): print("Authorize") auth={} - auth['requestId']=1 + auth['requestId']=str(1) auth['action']="authorize" auth['tokens']=self.token @@ -76,7 +75,7 @@ async def handleResponse(self,ws): def push(self,path,value): req={} - req['requestId']=self.request + req['requestId']=str(self.request) self.request+=1 req['action']="set" req['path']=path