Skip to content
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

Merged
merged 17 commits into from Jun 14, 2019

Conversation

@alandipert
Copy link
Contributor

@alandipert alandipert commented Jun 7, 2019

Please see rstudio/shinyloadtest#107 for details and discussion.

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()) }

This comment has been minimized.

@alandipert

alandipert Jun 13, 2019
Author Contributor

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) }

This comment has been minimized.

@alandipert

alandipert Jun 13, 2019
Author Contributor

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) {

This comment has been minimized.

@alandipert

alandipert Jun 13, 2019
Author Contributor

Don't need to warn because there won't necessarily be a problem

.takeWhile { it.startsWith("#") }
.map { readPropLine(it) }
.toMap()
if (props.containsKey("target")) {

This comment has been minimized.

@alandipert

alandipert Jun 13, 2019
Author Contributor

Need to accept old recordings, no need to warn

alandipert added a commit to rstudio/shinyloadtest that referenced this pull request Jun 14, 2019
Corresponds to rstudio/shinycannon#36
@alandipert alandipert marked this pull request as ready for review Jun 14, 2019
@alandipert alandipert merged commit c196de2 into master Jun 14, 2019
@alandipert alandipert deleted the check-target-server-type branch Jun 14, 2019
@alandipert alandipert mentioned this pull request Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.