-
Notifications
You must be signed in to change notification settings - Fork 23
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
Test Performance and Review Updates #364
Conversation
tests/testthat/test-gconfig.R
Outdated
expect_is(webprocess(), "webprocess") | ||
}) | ||
|
||
context("Test geoknife connection to GDP") |
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.
Would it be good to run this test first, so if there is a connection problem that is identified first?
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.
Sure, I just moved it to the download_result test. That's the first one that runs against the GDP.
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.
Actually, on second thought, I'll just remove it. I just moved the one thing it's testing uniquely to the test above it.
R/geoknife-generic.R
Outdated
@@ -117,7 +117,7 @@ parseXMLgeoms <- function(xml){ | |||
# ignore namespaces | |||
xpath <- sprintf("//*[local-name()='%s']/*[local-name()='%s']/*[local-name()='%s']",parentKey,childKey,key) | |||
nodes <- xml2::xml_find_all(xml, xpath, ns = pkg.env$NAMESPACES) | |||
values <- sapply(nodes,xml2::xml_text) | |||
values <- xml2::xml_text(nodes) |
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.
more tabs here
R/query-webdata-variables.R
Outdated
values <- sapply( | ||
xml2::xml_find_all(gcontent(response),'//gdp:shortname'), | ||
xml2::xml_text) | ||
values <- xml2::xml_text( |
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.
and here
This should be ready to merge. |
Some updates in here addressing comment on #362 and #361.
I modified the filter that gets sent in an execute request to not use gmlids. This should be an improvement because we don't have to query the WFS for all available values to filter. Fixes #287
The testing updates make tests run a good bit faster, especially when the network is slow. I mostly moved tests around and made local .rds artifacts where it wasn't necessary to call out to the server to initialize objects etc. There are still some tests that do things that are needlessly chatty or touch more data than they need to, I left a few comments to that affect. Happy to revert any and all the test changes, but I think they are a step in the right direction to test the geoknife code rather than the web services. This should fix #359.