Github user ahgittin commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/1066#discussion_r45842996
--- Diff:
usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestHttpCallImpl.java
---
@@ -66,31 +68,35 @@ public void start(Collection<? extends Location>
locations) {
}
}
- private Supplier<String> buildDataSupplier(final HttpAssertionTarget
httpAssertionTarget, final String url) {
-
- switch (httpAssertionTarget) {
+ private void doRequestAndCheckAssertions(Map<String, Duration> flags,
List<Map<String, Object>> assertions,
+ HttpAssertionTarget target,
final String url) {
+ switch (target) {
case body:
- return new Supplier<String>() {
+ Supplier<String> getBody = new Supplier<String>() {
--- End diff --
for checks like this which will be immediate this (anonymous class) is how
we'd do it (just FYI). if we need this in more than one or two places then I'd
create a `ResourceUtils.getResourceAsStringSupplier()` to do this.
btw we normally use `ResourceUtils` for reading URL's because it will use
classpath URL's and can be context aware. not important in this case but again
just FYI.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---