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

Test Performance and Review Updates #364

Merged
merged 7 commits into from
Sep 7, 2017
Merged

Test Performance and Review Updates #364

merged 7 commits into from
Sep 7, 2017

Conversation

dblodgett-usgs
Copy link
Collaborator

@dblodgett-usgs dblodgett-usgs commented Sep 1, 2017

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.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 95.238% when pulling 03a1633 on dblodgett-usgs:performance into 667b8e5 on USGS-R:master.

expect_is(webprocess(), "webprocess")
})

context("Test geoknife connection to GDP")
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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.

@@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more tabs here

values <- sapply(
xml2::xml_find_all(gcontent(response),'//gdp:shortname'),
xml2::xml_text)
values <- xml2::xml_text(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here

@dblodgett-usgs
Copy link
Collaborator Author

This should be ready to merge.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 95.238% when pulling d6a469c on dblodgett-usgs:performance into 667b8e5 on USGS-R:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 95.238% when pulling d6a469c on dblodgett-usgs:performance into 667b8e5 on USGS-R:master.

@wdwatkins wdwatkins merged commit f27494c into DOI-USGS:master Sep 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make tests run faster Ability to use filtered WFS in webgeom POST
3 participants