Skip to content

Commit

Permalink
fix: k6 test
Browse files Browse the repository at this point in the history
  • Loading branch information
liaosunny123 committed Sep 2, 2023
1 parent fe2de65 commit 5f4b1d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/k6/favorite_random.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { sleep, check } from 'k6';
import { sleep } from 'k6';
import http from 'k6/http';

export const options = {
Expand All @@ -19,7 +19,7 @@ export const options = {

export function favorite() {
let actionType = Math.random() < 0.5 ? 1 : 2;
let res = http.post(`http://127.0.0.1:37000/douyin/favorite/action/?token=e75fae76-6a4e-4fa8-9b60-230e5d4f6b29&video_id=3048003698&action_type=${actionType}`)
http.post(`http://127.0.0.1:37000/douyin/favorite/action/?token=e75fae76-6a4e-4fa8-9b60-230e5d4f6b29&video_id=3048003698&action_type=${actionType}`)

sleep(3)
}

0 comments on commit 5f4b1d7

Please sign in to comment.