-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ramda.js not working #339
Comments
What precisely happens when you do this, and what did you expect would happen? |
Precisely that error message happens. I have no idea what should happen though :) Looking briefly at the ramda.js docs, it seems R.clone() will make a deep copy of the obj, and then R.find() "returns the first element of the list which matches the predicate". Hmm, a list? |
|
Closing it because the problem looks a bug in the
Please, open a stackoverflow question for this type of questions. https://github.com/loadimpact/k6#need-help-or-want-to-contribute |
@liclac @ragnarlonn @ppcano Please don't suggest that clone call it's irrelevant (probably whole ramda) to this issue. Here is a more simplistic version with a different error.
This error is probably related to that ramda issue later and it looks like the root cause of it is related to usage of import * as R from "cdnjs.cloudflare.com/ajax/libs/ramda/0.25.0/ramda.min.js"
import {group, sleep, check} from "k6"
import http from "k6/http"
export let options = {
stages: [
{duration: "20s", target: 5},
{duration: "10s"},
{duration: "50s", target: 20},
{duration: "10s"},
{duration: "50s", target: 40},
{duration: "10s"},
{duration: "50s", target: 60},
{duration: "100s"},
{duration: "30s", target: 40},
{duration: "20s"},
]
}
export default function() {
const productId = 1
// Get all locations to reuse them in tests
let res = http.get("https://api.dev.peachworks.com/v1/products")
const products = JSON.parse(res.body).results
sleep(0.1)
group("xxx", function() {
const setup2 = R.find(R.propEq('id', productId), products)
sleep(0.1)
group("yyy", function() {
const setup3 = R.find(R.propEq('id', productId), products)
sleep(0.1)
})
})
} Should I create a separate issue for this? |
I reproduced this case in the following gist. The problem with the above script is that wrong data will be passed to the It looks to exist a bug that reports wrongly |
The below, reported by askierniewski@slack, happens when the script further down is run:
The script:
The text was updated successfully, but these errors were encountered: