Commit 2fc9447c authored by litaolemo's avatar litaolemo

update

parent 2f71ce82
...@@ -10,9 +10,7 @@ from locust import HttpUser, task ...@@ -10,9 +10,7 @@ from locust import HttpUser, task
ip = '172.16.52.25@elastic:gengmei!@#' ip = '172.16.52.25@elastic:gengmei!@#'
ip,auth = ip.split("@",1) ip,auth = ip.split("@",1)
heasers = {
"Content-Type": "application/json"
}
query_list = {"鼻综合":22, query_list = {"鼻综合":22,
"激光脱面部其他毛发":36, "激光脱面部其他毛发":36,
"切开双眼皮":85, "切开双眼皮":85,
...@@ -857,8 +855,10 @@ class QuickstartUser(HttpUser): ...@@ -857,8 +855,10 @@ class QuickstartUser(HttpUser):
},"size":10 },"size":10
} }
""".replace("{query}",random.choice(json.dumps(query_Str_list))) """.replace("{query}",random.choice(json.dumps(query_Str_list)))
heasers = {
response = self.client.post('/gm-dbmw-service-read/_search', data=data, verify=False, auth=tuple(auth.split(':',1)),heasers=heasers) "Content-Type": "application/json"
}
response = self.client.post('/gm-dbmw-service-read/_search',heasers=heasers,data=data, verify=False, auth=tuple(auth.split(':',1)))
print(response.text) print(response.text)
# self.client.get("/hello") # self.client.get("/hello")
# self.client.get("/world") # self.client.get("/world")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment