ptuomola commented on pull request #980:
URL: https://github.com/apache/fineract/pull/980#issuecomment-640267243


   @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:
[email protected]


Reply via email to