Skip to content

Commit

Permalink
name changes and minus async
Browse files Browse the repository at this point in the history
  • Loading branch information
kclark-scottlogic committed Feb 29, 2024
1 parent 9549bcb commit 6f97ae8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions k6/load.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { requestFunction } from './requestFunctionExtract.js';
import { postWithSessionUpdate } from './requestFunctions.js';

export const options = {
//vus and duration can be changed depending on what simulation needed running
Expand All @@ -11,6 +11,6 @@ export const options = {
},
};

export default async function () {
requestFunction();
}
export default () => {
postWithSessionUpdate();
};
2 changes: 1 addition & 1 deletion k6/requestFunctionExtract.js → k6/requestFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const vuCookieJar = (() => {
};
})();

export function requestFunction() {
export function postWithSessionUpdate() {
// Use same jar for every iteration of same VU! k6 doesn't do this for us :(
const vuID = exec.vu.idInTest;
let jar = vuCookieJar.get(vuID);
Expand Down
8 changes: 4 additions & 4 deletions k6/spike.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { requestFunction } from './requestFunctionExtract.js';
import { postWithSessionUpdate } from './requestFunctions.js';

export const options = {
// Key configurations for spike in this section
Expand All @@ -8,6 +8,6 @@ export const options = {
],
};

export default async function () {
requestFunction();
}
export default () => {
postWithSessionUpdate();
};

0 comments on commit 6f97ae8

Please sign in to comment.