Skip to content
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

Fixing Task201014UpdateColumnsValueInIdentifierTableTest #20026

Merged

Conversation

nollymar
Copy link
Contributor

@nollymar nollymar commented Mar 2, 2021

This test was failing in Oracle

@delete-merged-branch delete-merged-branch bot deleted the branch release-21.03 March 2, 2021 17:15
.append("and inode.inode=temp.inode and inode.idate=custom_select.idate \n")
.append("and temp.structure_inode = struc.inode) my_query\n")
.append("set ident.owner=my_query.mod_user, ident.create_date=my_query.idate,\n")
query.append("UPDATE identifier ident,\n")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changing format only

.append("and inode.inode=temp.inode and inode.idate=custom_select.idate \n")
.append("and temp.structure_inode = struc.inode) my_query\n")
.append(" where id=myID;\n");
query.append("UPDATE identifier SET owner=mod_user, create_date=idate, asset_subtype=velocity_var_name from\n")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changing format only

}

private String getQueryToUpdateNonContentletsPostgres(final String tableName){
final StringBuilder query = new StringBuilder();
return query.append("update identifier set owner=iowner, create_date=idate from\n")
.append("(select distinct temp.identifier myID, owner iowner, inode.idate idate from ")
return query.append("UPDATE identifier SET owner=iowner, create_date=idate FROM\n")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changing format only

}

private String getQueryToUpdateNonContentletsMySQL(final String tableName){
final StringBuilder query = new StringBuilder();
return query.append("update identifier ident,\n")
.append("(select distinct temp.identifier myID, owner iowner, inode.idate idate from ")
return query.append("UPDATE identifier ident,\n")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changing format only

@@ -96,10 +96,13 @@ private boolean areValuesEqual(final Identifier expectedResult, final Map<String
((Date)result.get("create_date")).getTime()).toLocalDateTime().truncatedTo(
ChronoUnit.SECONDS);

return result.get("owner").equals(expectedResult.getOwner()) &&
return ((expectedResult.getOwner() == null && result.get("owner") == null) || result
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks very confusing. I'd try to refactor maybe creating small methods with good names.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@nollymar nollymar merged commit 7b292be into release-21.03 Mar 3, 2021
dsilvam added a commit that referenced this pull request Mar 18, 2021
* Fixing Task201014UpdateColumnsValueInIdentifierTableTest (#20026)

* Fixing test

* run-all

* Refactoring validations after code review suggestion

* run-all

Co-authored-by: Nollymar Longa <>

* Updating core-web version

* new core-web artifact

* 19992 rebuild es client on illegal state exception (#20014)

* #1992 Rebuild REST High Level Client if Reactor stopped

* #1992 remove not-needed code

* #1992 remove not-needed code

* #19992 Default impl for rebuildClient. Move rebuilding to seperate catch

* #19992 Rebuild client on IllegalState Reactor wrapped and unwrapped

* #19992 null-check

Co-authored-by: Daniel Silva <daniel.silva@dotcms.com>

* Update coreWebReleaseVersion

* Issue 20038 samesite strict (#20051)

* #20038 redirect using html form

* #20038 html based redirect

* Updating starter version to 20210305

* new core-web version

* Update coreWebReleaseVersion

* #19772 Avoid Login when a logout request is sent (#20037)

* #19772 Avoid Login when a logout request is sent

* #19772 Add test to the MainSuite

* #20058 turn on security options (#20061)

* Upgrade saml to 21.03 (#20070)

* #20063 sending cookies httponly and secure (#20065)

* Issue 19934 adding folder to root throws a jsp error (#20073)

* If folder is newly not show the permission tab

* #19934 Format

* Fix tests oracle (#20054)

* Fix ContentletWebAPIImplIntegrationTest

* replace null with empty string

* Remove extra folder extension

* run-all

* Upgrade saml 21.03 (#20076)

* Upgrade saml to 21.03

* upgrade saml to 21.03.1

* Change order of Mapping test. Decrease time in other tests. Move IT t… (#20072)

* Change order of Mapping test. Decrease time in other tests. Move IT to Unit

* Attempt removing getting-started-layout by id and name

* Missing changes

* #19683 Create endpoint to get the create content url

* Fixing test (#20086)

* Fixing test

* Fixing test

* Update .gitmodules

* Find getting started layout by name instead of id (#20092)

* Changing the logic to get the Getting Starter portlet layout. Now, it searches by name instead of id

* Updating starter version

Co-authored-by: Nollymar Longa <>

* Updte image api url in gs portlet

* Issue 20098 send page mimetype if is page (#20099)

* #20058 turn on security options

* #20098 this sets the mime type to a page if the url is a page in dotCMS

* Remove same height container fix

* Update .gitmodules

* Update gradle.properties

* Update gradle.properties

Co-authored-by: Nollymar Longa <nollymar.longa@dotcms.com>
Co-authored-by: Nollymar Longa <>
Co-authored-by: Will Ezell <will@dotcms.com>
Co-authored-by: Freddy Montes <freddymontes@gmail.com>
Co-authored-by: dotcmsbuild <dotcmsbuild@dotcms.com>
Co-authored-by: Freddy Rodriguez <freddy0309@gmail.com>
Co-authored-by: Jonathan <jonathan.sanchez@dotcms.com>
Co-authored-by: erickgonzalez <erick.gonzalez@dotcms.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants