[
https://issues.apache.org/jira/browse/HDDS-1458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16852376#comment-16852376
]
Eric Yang commented on HDDS-1458:
---------------------------------
[~elek]
Patch 14 keeps ozoneblockade files in dist. There is a separate set of compose
file which runs in maven verify using ozone image. This helps to keep
hadoop-runner and apache/ozone images separated and both can be tested.
{code}os.path.dirname(os.path.dirname(os.path.realpath(__file__)){code}
Os.path.realpath has some limitations in [recursive
symlink|https://bugs.python.org/issue11397] and directory prefix started with
~, and [change directory|https://bugs.python.org/issue24670]. We can not
guarantee that user doesn't create symlink to OZONE_HOME, nor we can guarantee
that user doesn't expand ozone tarball in user's home directory with symlinks.
Pytest uses os.chdir to create temp directory for report generation. The
chance of running into problem is much higher using os.path.realpath(__file__)
in permutations that were not thought out.
Many of the issues are only addressed in Python 3.4+. Given that we are
working with older version of python because of pytest and blockade. The fixes
are not available in python2.7. This is my reasoning to use os.getcwd() as
OZONE_HOME reference. I admit that getcwd() may inconvenient individual that
already developed the habit of running python code from tests/blockade
directory. However, that was never in the documentation, and there is a
shorter route to use mvn clean verify -Pit to run the tests. May I suggest to
keep using getcwd() until we can moved to newer version of python, pytest and
blockade?
> Create a maven profile to run fault injection tests
> ---------------------------------------------------
>
> Key: HDDS-1458
> URL: https://issues.apache.org/jira/browse/HDDS-1458
> Project: Hadoop Distributed Data Store
> Issue Type: Test
> Reporter: Eric Yang
> Assignee: Eric Yang
> Priority: Major
> Labels: pull-request-available
> Fix For: 0.4.1
>
> Attachments: HDDS-1458.001.patch, HDDS-1458.002.patch,
> HDDS-1458.003.patch, HDDS-1458.004.patch, HDDS-1458.005.patch,
> HDDS-1458.006.patch, HDDS-1458.007.patch, HDDS-1458.008.patch,
> HDDS-1458.009.patch, HDDS-1458.010.patch, HDDS-1458.011.patch,
> HDDS-1458.012.patch, HDDS-1458.013.patch, HDDS-1458.014.patch
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Some fault injection tests have been written using blockade. It would be
> nice to have ability to start docker compose and exercise the blockade test
> cases against Ozone docker containers, and generate reports. This is
> optional integration tests to catch race conditions and fault tolerance
> defects.
> We can introduce a profile with id: it (short for integration tests). This
> will launch docker compose via maven-exec-plugin and run blockade to simulate
> container failures and timeout.
> Usage command:
> {code}
> mvn clean verify -Pit
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]