New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CB-16465 Lazy load safe toString() methods #12485
Conversation
76640f8
to
92200ab
Compare
core-model/src/main/java/com/sequenceiq/cloudbreak/domain/StructuredEventEntity.java
Outdated
Show resolved
Hide resolved
it would be nice to see unit tests just to make sure we dont break this |
I have added EntityToStringTest for this purpose, do we need other tests? |
935836a
to
4e27d15
Compare
I have realized that my initial test only covered the entities included in the core service, so I have moved the original unit test to the common module, and extended it in each of our services ( |
a2832ed
to
60694a3
Compare
f22ff17
to
92a55fb
Compare
core-model/src/main/java/com/sequenceiq/cloudbreak/domain/SecurityConfig.java
Outdated
Show resolved
Hide resolved
I'm a little concerned about the extended pressure on the logging system. Might worth to check how much more we log during mock tests. Sadly I don't see the results of of the IT test anymore. |
I do not think that it will have a huge impact, and it is better to log at least the crns of domain objects. But I will compare the IT log size to be sure. |
@lnardai IT log sizes: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! A few minor comments.
common/src/main/java/com/sequenceiq/cloudbreak/util/DatabaseUtil.java
Outdated
Show resolved
Hide resolved
common/src/test/java/com/sequenceiq/cloudbreak/AbstractEntityToStringTest.java
Outdated
Show resolved
Hide resolved
common/src/test/java/com/sequenceiq/cloudbreak/AbstractEntityToStringTest.java
Outdated
Show resolved
Hide resolved
common/src/test/java/com/sequenceiq/cloudbreak/AbstractEntityToStringTest.java
Outdated
Show resolved
Hide resolved
redbeams/src/main/java/com/sequenceiq/redbeams/domain/stack/Network.java
Show resolved
Hide resolved
redbeams/src/main/java/com/sequenceiq/redbeams/domain/stack/Network.java
Show resolved
Hide resolved
redbeams/src/main/java/com/sequenceiq/redbeams/domain/stack/SecurityGroup.java
Outdated
Show resolved
Hide resolved
redbeams/src/main/java/com/sequenceiq/redbeams/domain/stack/SecurityGroup.java
Outdated
Show resolved
Hide resolved
workspace/src/main/java/com/sequenceiq/cloudbreak/workspace/model/User.java
Outdated
Show resolved
Hide resolved
@Bajzathd A general note: I suggest creating a wiki and sending a msg to Slack regarding the usage patterns & expectations introduced here. |
Added tests for Entity classes to make sure they implement toString() correctly.
Thank you @lajosrodek for the review! I have answered a question and fixed the others. The wiki is a good idea, I will create it shortly. |
Should we close this or you plan to resolve conflicts? Should we this a draft in meanwhile? |
I'm closing this |
Added tests for Entity classes to make sure they implement toString() correctly.