[
https://issues.apache.org/jira/browse/FINERACT-780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16884699#comment-16884699
]
Michael Vorburger.ch commented on FINERACT-780:
-----------------------------------------------
It depends why exactly the test fails sometimes. My assumption, which I have
not fully verified (but you could have a closer look at the TravisCI build
failure logs from the two PRs mentioned above), is that, for some reason,
sometimes echo-webhook.herokuapp.com is not up / reachable / fast enough (this
is IMHO quite likely to, occassionally, happen). In that case, "generating it
uniquely everytime the test runs" would make no difference - do you agree?
If I'm misinterpreting what's going on here (which is totally possible!) and
this is e.g. some sort of concurrency problem where tests running in parallel,
or on some developer's workstations, change this value which supposed to be
unique, then what you suggest could be a great idea. But I haven't looked at
the details of the test or the failure to be able to say that it would. If you
have, then perhaps just briefly explain here what you've analysed to be the
real root cause, and go for it!
> HookIntegrationTest is flaky
> ----------------------------
>
> Key: FINERACT-780
> URL: https://issues.apache.org/jira/browse/FINERACT-780
> Project: Apache Fineract
> Issue Type: Bug
> Reporter: Michael Vorburger.ch
> Priority: Major
>
> Our org.apache.fineract.integrationtests.HookIntegrationTest seems to be
> "flaky" and occassionally arbitrary fails.
> This seems to have happened e.g. in
> https://github.com/apache/fineract/pull/557 as well as again in
> https://github.com/apache/fineract/pull/607.
> I suspect it's related to this in the code of that test:
> {code:java}
> // Subject to https://echo-webhook.herokuapp.com being up
> // See
> //
> http://www.jamesward.com/2014/06/11/testing-webhooks-was-a-pain-so-i-fixed-the-glitch
> final String payloadURL =
> "http://echo-webhook.herokuapp.com:80/Z7RXoCBdLSFMDrpn?";
> this.hookHelper.createHook(payloadURL);
> {code}
> In an ideal world, even an integration test should not depend on an external
> service running on some arbitrary 3rd party website.
> What someone probably could do is to instead start some sort of Echo Server
> written in Java in-process as part of that test. Something like this may
> already exist as a library somewhere, or otherwise it probably wouldn't be
> terribly hard to write it.
> If this happens more often, perhaps just temporarily adding an {{@Igore}} for
> this test would be in order (until someone can do above).
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)