fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [fineract] ptuomola commented on pull request #980: FINERACT-1019: Fix import integration tests
Date Sun, 07 Jun 2020 19:25:43 GMT

ptuomola commented on pull request #980:

   @vorburger Hmm... looks like it's not that easy after all. If I've understood this correctly,
the current logic works like this: 
   If we call getOutputTemplateLocation() before the import processing has completed, then
we get the location where Fineract has stored the import document - not the output document!
Only after the processing has completed, the same API call returns the output document location
- but we have no way of knowing when the processing is ready. 
   Personally I think that's not a great design of an API - to put it nicely :-). I hope I've
missed something, but the testing seems to confirm this behaviour. 
   So I can see a couple of options: 
   1. Accept the Thread.sleep of 10 seconds in the integration tests
   2. Implement some logic that repeatedly calls the API and tries to guess from the filename
whether the processing has completed. But that might introduce flakiness...
   3. Rework the entire API logic e.g. to return 204 No content if called before the processing
has completed
   Personally I think #3 would be the right way to solve this, but not sure what clients will
be broken by this. Maybe I should install the community app and see how that deals with this...

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:

View raw message