Skip to content

GEODE-3539: add test coverage for "create async-event-queue" and "lis…#1093

Merged
jinmeiliao merged 3 commits intoapache:developfrom
jinmeiliao:hydra
Nov 29, 2017
Merged

GEODE-3539: add test coverage for "create async-event-queue" and "lis…#1093
jinmeiliao merged 3 commits intoapache:developfrom
jinmeiliao:hydra

Conversation

@jinmeiliao
Copy link
Member

…t async-event-queue"

Thank you for submitting a contribution to Apache Geode.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

  • Has your PR been rebased against the latest commit within the target branch (typically develop)?

  • Is your initial contribution a single, squashed commit?

  • Does gradlew build run cleanly?

  • Have you written or updated unit tests to verify your changes?

  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?

Note:

Please ensure that once the PR is submitted, you check travis-ci for build issues and
submit an update to your PR as soon as possible. If you need help, please send an
email to dev@geode.apache.org.

.tableHasRowCount("Member", 4).tableHasRowWithValues("Member", "ID", "server-1", "queue1")
.tableHasRowWithValues("Member", "ID", "server-2", "queue2")
.tableHasRowWithValues("Member", "ID", "server-1", "queue")
.tableHasRowWithValues("Member", "ID", "server-2", "queue");

Choose a reason for hiding this comment

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

Point of discussion (not necessary to change, but something to consider) : the signature of {{tableHasRowWithValues}} has {{headersThenValues}}. I didn't notice this from the previous change to CommandResultAssert, but I think that that ordering of the {{String}} arguments as {{header, value}} pairs is more readable. With only one or two values in the row it's not too confusing, but with a longer list of values of interest, then associating the matching header and values becomes less clear when reviewing code that calls the method.

Copy link
Member Author

Choose a reason for hiding this comment

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

so you are suggesting the caller should call something like: tableHasRowWithValues("Member,server-2", "ID,queue2")

this would make the processing a bit harder, but still doable. It's just the way these GFJsonObject are constructed, We will have to refactor out this entire result object anyway, good things we are lumping all the processing in this CommandResultAssert object so it's one spot to change.

Choose a reason for hiding this comment

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

No, what I would envision is tableHasRowWithValues(Member, server-2, ID, queue2). I would keep the arguments separate but order arguments as pairs ..., header, value, ... . I agree that processing this wouldn't be quite as straightforward as

String[] headers = Arrays.copyOfRange(headersThenValues, 0, numberOfColumn);
String[] expectedValues =
    Arrays.copyOfRange(headersThenValues, numberOfColumn, headersThenValues.length);

Choose a reason for hiding this comment

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

Since the catch is no longer for {{Throwable}} a better name for the variable would be 'e'

@jinmeiliao
Copy link
Member Author

precheckin green

@jinmeiliao jinmeiliao merged commit de22c2d into apache:develop Nov 29, 2017
@jinmeiliao jinmeiliao deleted the hydra branch November 29, 2017 21:53
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.

3 participants

Comments