Hello,
I need to test the refresh token handler with ramping arrival rate.
There is a certain array of tokens = [token1, token2…]
And I want tokens[0] to be given to VU 1, and token[1] to be given to VU 2.
And then there is a recursive update of tokens in each iterations, something like this:
const refreshTokens = JSON.parse(open('../../tests/refreshs.json'));
export async function getOnlyRefresh() {
for (let refresh of refreshTokens) {
let newRefresh = await oauthTokenRefresh(refresh, clientId)
await refreshRecursive(newRefresh) //call refresh again till the end of test
}
}
Because the way it works right now is that I give an array of tokens and each VU tries to update it