hunyadi-dev commented on a change in pull request #1053:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1053#discussion_r617222970
##########
File path: docker/test/integration/environment.py
##########
@@ -1,26 +1,29 @@
-from behave import fixture, use_fixture
import sys
sys.path.append('../minifi')
import logging
+import datetime
from MiNiFi_integration_test_driver import MiNiFi_integration_test
from minifi import *
def raise_exception(exception):
- raise exception
+ raise exception
-@fixture
-def test_driver_fixture(context):
- context.test = MiNiFi_integration_test(context)
- yield context.test
- logging.info("Integration test teardown...")
- del context.test
+def integration_test_cleanup(test):
+ logging.info("Integration test cleanup...")
+ del test
def before_scenario(context, scenario):
- use_fixture(test_driver_fixture, context)
+ logging.info("Integration test setup at
{time:%H:%M:%S:%f}".format(time=datetime.datetime.now()))
+ context.test = MiNiFi_integration_test(context)
def after_scenario(context, scenario):
- pass
+ logging.info("Integration test teardown at
{time:%H:%M:%S:%f}".format(time=datetime.datetime.now()))
+ if context is not None and hasattr(context, "test"):
+ context.test.cleanup() # force invocation
+ del context.test
+ else:
+ raise Exception("Test")
Review comment:
I think it was already rewritten by the time you commented :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]