You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2020/06/04 03:11:30 UTC

[GitHub] [fineract] ptuomola opened a new pull request #980: FINERACT-1019: Fix import integration tests

ptuomola opened a new pull request #980:
URL: https://github.com/apache/fineract/pull/980


   ## Description
   Import integration tests were failing and ignored for various reasons (timeout, incorrect test data set-up etc)
   
   ## Checklist
   Please make sure these boxes are checked before submitting your pull request - thanks!
   
   - [ ] Commit message starts with the issue number from https://issues.apache.org/jira/projects/FINERACT/. Ex: FINERACT-646 Pockets API.
   
   - [ ] Coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions have been followed.
   
   - [ ] API documentation at fineract-provider/src/main/resources/static/api-docs/apiLive.htm has been updated with details of any API changes.
   
   - [ ] Integration tests have been created/updated for verifying the changes made.
   
   - [ ] All Integrations tests are passing with the new commits.
   
   - [ ] Submission is not a "code dump".  (Large changes can be made "in repository" via a branch.  Ask on the list.)
   
   Our guidelines for code reviews is at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [fineract] ptuomola commented on pull request #980: FINERACT-1019: Fix import integration tests

Posted by GitBox <gi...@apache.org>.
ptuomola commented on pull request #980:
URL: https://github.com/apache/fineract/pull/980#issuecomment-640344047


   @vorburger I've just checked how the frontend works - smartly it doesn't rely on getOutputTemplateLocation immediately providing the right value straightaway. Given all we are doing here is trying to save a few seconds on an integration test, I don't think changing the API behaviour is worth it. So your suggestion to merge this as-is sounds good.
   
   There is still something wrong with the import functionality when using the community app - it doesn't always seem to work. It won't have anything to do with these changes (especially as they have not yet been merged), but I'll investigate what's wrong and raise a JIRA as required...
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [fineract] vorburger merged pull request #980: FINERACT-1019: Fix import integration tests

Posted by GitBox <gi...@apache.org>.
vorburger merged pull request #980:
URL: https://github.com/apache/fineract/pull/980


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [fineract] ptuomola commented on pull request #980: FINERACT-1019: Fix import integration tests

Posted by GitBox <gi...@apache.org>.
ptuomola commented on pull request #980:
URL: https://github.com/apache/fineract/pull/980#issuecomment-640246972


   @vorburger ah ok - awaiting for the file to appear definitely makes sense, I'll see if I can get that to work without too much hassle and will add that to this PR. 
   
   In terms of the rest of the PR, as far as I can see it's either already covered by this - though for a number of changes in that PR, I'm not quite sure why they are needed...


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [fineract] vorburger commented on pull request #980: FINERACT-1019: Fix import integration tests

Posted by GitBox <gi...@apache.org>.
vorburger commented on pull request #980:
URL: https://github.com/apache/fineract/pull/980#issuecomment-640270084


   Or let's just merge this as-is already, as a slow test is better than an
   ignored test, and you can subsequently improve it? - I don't mind, at all
   (seeing now how it's not quite so trivial).
   
   >
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [fineract] ptuomola commented on pull request #980: FINERACT-1019: Fix import integration tests

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org



[GitHub] [fineract] ptuomola commented on pull request #980: FINERACT-1019: Fix import integration tests

Posted by GitBox <gi...@apache.org>.
ptuomola commented on pull request #980:
URL: https://github.com/apache/fineract/pull/980#issuecomment-640154877


   @awasum Thanks. I don't think I've changed anything that would change the behaviour of the API from the perspective of the UI - but I can try to see if I can test this with the UI as well. 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [fineract] ptuomola commented on pull request #980: FINERACT-1019: Fix import integration tests

Posted by GitBox <gi...@apache.org>.
ptuomola commented on pull request #980:
URL: https://github.com/apache/fineract/pull/980#issuecomment-640407436


   Confirmed that import is fixed now also for the community app - so nothing further required


----------------------------------------------------------------
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:
users@infra.apache.org