Project

General

Profile

Actions

Task #1906

closed

ModelMapperChecker - test usage in LRT

Added by Radek Tomiška about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Radek Tomiška
Category:
Dto mapping
Target version:
Start date:
10/17/2019
Due date:
% Done:

100%

Estimated time:
Owner:

Description

ModelMapperChecker doesn't work, if it's executed when application starts. Try to run ModelMapperChecker in LRT manually.


Files


Related issues

Related to IdStory Identity Manager - Task #1888: Update ModelMapperClosedRadek Tomiška10/03/2019

Actions
Actions #1

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?

Actions #2

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.

Actions #3

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?

Actions #4

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

Actions #6

Updated by Radek Tomiška about 5 years ago

  • Status changed from Needs feedback to Resolved

Nice, thx for this change!

Actions #7

Updated by Radek Tomiška about 5 years ago

Actions #8

Updated by Radek Tomiška about 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF