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
MINIFI-290 Refactor Tests #95
Conversation
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.
LGTM, but may want to rename YamlConfiguration as there is a typo in it.
reviewing |
Hey @kevdoran. This is certainly a lot cleaner and a much welcomed improvement. Might you be able to rebase on the changes that went in recently for the updates to how configure is handled and take care of renaming YamlConfiguration while we are messing with it in this commit? Thanks! |
Thanks for the feedback @apiri. Will do |
eef2e65
to
deb3e2f
Compare
@kevdoran Thanks for rebasing/adjusting. Will get this merged. |
Saw that the Travis build for Linux failed. Doing some additional builds/runs to make sure we're clear first. |
I'll run some more linux tests as well. Should we look into configuring the CTests to dump verbose output on failures so we could get more information out of Travis? |
Here is the verbose test
It looks like this is failing for the same reason identified in MINIFI-304, which is resolved in @phrocker's pull request #96 [1]. Is that ready to merge? [1] #96 |
Will do. |
- Correct doxygen function comment in YamlConfiguration - Correct a log message in YamlConfiguration - Tweak ubuntu Dockerfile to fix docker build target - Add --output-on-failure flag to Travis config
36c1ec5
to
25c8b6e
Compare
@apiri @phrocker - update on this: The approach of setting a hardcoded working directory when adding tests to ctest in the CMakeLists.txt file proved to be too brittle. If you invoke the test executable directly, it fails. After some exploration, I could not find a way to pass the resource location to the Catch unit tests in a manner that I was satisfied with. Two alternatives I explored included passing the location as an environment variable and passing it as a command line argument. The environment variable approach was a no-go as it it would require us to setup the "test" target in CMake using something other than enable_testing() and instead creating our own target, which seemed undesirable at this time. The argument approach would require us to define our own main for Catch unit tests, rather than using the The benefits here seemed minor, and could not justify the extra complexity introduced by the workarounds I explored (IMO), so I reverted the yaml config to being hardcoded inline strings. For now, I recommend closing MINIFI-290 as "won't do" and merge this PR which has a few other changes that I cam across while investigating this. Alternatively, we could move MINIFI-290 back to "open" if we want to revisit this in the future... but I'm sure if the need arises we would reopen it or make a new ticket. |
@kevdoran thanks for all the thought process and rationale. totally seems fair. will review the updates. thanks! |
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.
@kevdoran Looks good overall just had one question on the block with the resources path which I believe is no longer needed. Let me know if that is the case and I can remove on merge. Thanks!
libminifi/test/TestBase.h
Outdated
@@ -29,6 +29,13 @@ | |||
#include "core/Core.h" | |||
#include "properties/Configure.h" | |||
|
|||
/* Defining the root location of test resource files here in case it moves. * |
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.
Is this a relic of the original approach? Don't believe it's currently being used any more.
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.
Good catch! Will push a commit removing that to my branch
f59e296
to
b101e4c
Compare
Updated |
@kevdoran cool, thanks will get merged! |
- Correct doxygen function comment in YamlConfiguration - Correct a log message in YamlConfiguration - Tweak ubuntu Dockerfile to fix docker build target - Add --output-on-failure flag to Travis config This closes apache#95. Signed-off-by: Aldrin Piri <aldrin@apache.org>
Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.
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?
Does your PR title start with MINIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
Has your PR been rebased against the latest commit within the target branch (typically master)?
Is your initial contribution a single, squashed commit?
For code changes:
For documentation related changes:
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.