-
Notifications
You must be signed in to change notification settings - Fork 6
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
Assert target application server is the same type recording was created with #36
Conversation
…n't parse properly
xpath(resp.body, "/html/head/script") | ||
.flatMap { List(it.attributes.length, { i -> it.attributes.item(i)}) } | ||
.filter { it.nodeName == "src" } | ||
.find { it.nodeValue.matches("^.*/shiny.min.js$".toRegex()) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to escape dots and also check for shiny.js
too
fun readProps(lines: List<String>, logger: Logger): Props { | ||
val props = lines.asSequence() | ||
.takeWhile { it.startsWith("#") } | ||
.map { readPropLine(it) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why doesn't .map(readPropLine)
work?
logger.warn("Recording made with '${rec.props.targetType.typeName}' but target looks like '${detectedType.typeName}'") | ||
} | ||
|
||
if (rec.props.version < RECORDING_VERSION) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need to warn because there won't necessarily be a problem
.takeWhile { it.startsWith("#") } | ||
.map { readPropLine(it) } | ||
.toMap() | ||
if (props.containsKey("target")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to accept old recordings, no need to warn
Corresponds to rstudio/shinycannon#36
Please see rstudio/shinyloadtest#107 for details and discussion.