Task #1906
closedModelMapperChecker - test usage in LRT
100%
Description
ModelMapperChecker doesn't work, if it's executed when application starts. Try to run ModelMapperChecker in LRT manually.
Files
Related issues
Updated by Radek Tomiška about 5 years ago
- Description updated (diff)
- Status changed from In Progress to Needs feedback
- Assignee changed from Radek Tomiška to Vít Švanda
- % Done changed from 0 to 90
I moved ModelMapperChecker into new LRT and test possible scenarios:
- checker is executed before synchronization executed manually
- checker is executed before scheduled synchronization
Both scenarios work.
I tested to move executing checker after acc module is initialized and it works too. But we cannot be sure some other module will fail on the same exception. We don't have a hook in the application, after all modules are initialized (depends on #812). Can be moved there in the future.
Commit with LRT (available in LTS version):
https://github.com/bcvsolutions/CzechIdMng/commit/79ce5b6ccc8039a458cbd5a4720b3f7dab373d42
Test:
https://github.com/bcvsolutions/CzechIdMng/commit/27546bb2b955984865b63b7a1d4c4a2a0e38b4a0
Could you do a feedback, please?
Updated by Vít Švanda about 5 years ago
- Status changed from Needs feedback to In Progress
- Assignee changed from Vít Švanda to Radek Tomiška
- % Done changed from 90 to 100
I made a review. I started checker as LRT. After it I successfully started a sync. Thanks for that.
I found one confusing behavior. My data are a little broken. So the checker throw javax.persistence.EntityNotFoundException
. I expected that the LRT will ends with exception, but it ends successfully.
I understand that LRT will fail only if ModelMapper exception will be throw now, but mark result as fail on EntityNotFoundException (may be Exception) will be usefull too.
Updated by Radek Tomiška about 5 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Radek Tomiška to Vít Švanda
I agree, i improved exception handling:
https://github.com/bcvsolutions/CzechIdMng/commit/9845dc015a8d76ff5f371b359c3831fdcb15aa79
Could you do a feedback again, please?
Updated by Vít Švanda about 5 years ago
- Assignee changed from Vít Švanda to Radek Tomiška
My EntityNotFound exception is wrapped in other exception, so I made small improvment. Can you make a review :-)?
https://github.com/bcvsolutions/CzechIdMng/commit/4d05fe6f6a4453cb4af4e33eddb945bc515e4263
Updated by Vít Švanda about 5 years ago
Updated by Radek Tomiška about 5 years ago
- Status changed from Needs feedback to Resolved
Nice, thx for this change!
Updated by Radek Tomiška about 5 years ago
- Related to Task #1888: Update ModelMapper added
Updated by Radek Tomiška about 5 years ago
- Status changed from Resolved to Closed