-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
lint(test): remove unused imports, other test fixes #7659
lint(test): remove unused imports, other test fixes #7659
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -1084,7 +1084,7 @@ public RestoreIndicesResult restoreIndices(@Nonnull RestoreIndicesArgs args, @No | |||
logger.accept(String.format( | |||
"Reading rows %s through %s from the aspects table completed.", args.start, args.start + args.batchSize)); | |||
|
|||
for (EbeanAspectV2 aspect : rows.getList()) { | |||
for (EbeanAspectV2 aspect : rows != null ? rows.getList() : List.<EbeanAspectV2>of()) { |
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.
Rows is null when cassandra
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.
Really? That's wild
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.
Cassandra will return null since it doesn't implement the paged method. Not new, but there seems to be a new test.
@@ -107,6 +107,7 @@ public boolean setRetention(@Nullable String entityName, @Nullable String aspect | |||
GenericAspect retentionAspect = GenericRecordUtils.serializeAspect(retentionConfig); | |||
aspectProposal.setAspect(retentionAspect); | |||
aspectProposal.setAspectName(Constants.DATAHUB_RETENTION_ASPECT); | |||
aspectProposal.setChangeType(ChangeType.UPSERT); |
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.
seems like we just need to set this
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.
was something breaking due to not having this? why didn't we see before
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.
This breaks a test, seems like if the change type is null it will fail a validation check. If non-timeseries, then this must be either PATCH or UPSERT. Null is no longer valid.
assertNull(mcl.getPreviousSystemMetadata()); | ||
assertEquals(mcl.getChangeType(), ChangeType.RESTATE); | ||
assertEquals(mcl.getSystemMetadata().getProperties().get(FORCE_INDEXING_KEY), "true"); | ||
if (this instanceof EbeanEntityServiceTest) { |
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.
only valid for ebean, not cassandra
@@ -1084,7 +1084,7 @@ public RestoreIndicesResult restoreIndices(@Nonnull RestoreIndicesArgs args, @No | |||
logger.accept(String.format( | |||
"Reading rows %s through %s from the aspects table completed.", args.start, args.start + args.batchSize)); | |||
|
|||
for (EbeanAspectV2 aspect : rows.getList()) { | |||
for (EbeanAspectV2 aspect : rows != null ? rows.getList() : List.<EbeanAspectV2>of()) { |
Check warning
Code scanning / QDJVMC
Constant values
@@ -1084,7 +1084,7 @@ | |||
logger.accept(String.format( | |||
"Reading rows %s through %s from the aspects table completed.", args.start, args.start + args.batchSize)); | |||
|
|||
for (EbeanAspectV2 aspect : rows.getList()) { | |||
for (EbeanAspectV2 aspect : rows != null ? rows.getList() : List.<EbeanAspectV2>of()) { |
Check warning
Code scanning / QDJVMC
Constant values
Checklist