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

Issues 2728, 2878, and 2879 - Remove old query builder, update tests, and fix issues #2881

Merged
merged 3 commits into from
Oct 22, 2021

Conversation

lmsurpre
Copy link
Member

@lmsurpre lmsurpre commented Oct 21, 2021

After removing the old xParmBehaviorUtil classes, I realized that we never updated their corresponding tests to the new builders. In the process of doing that, I discovered and fixed #2878 and #2879.

After this one, we still need to do some work if we want to remove the older-style jdbc cache implementations because they are still being used in places.

Copy link
Contributor

@michaelwschroeder michaelwschroeder left a comment

Choose a reason for hiding this comment

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

LGTM - just one comment to update user's guide

I also removed the older-style `addXCacheCandidate` methods from the
ParameterDAO and ResourceDAO interfaces and reduced their visibility in
the implementation classes.

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
should be cosine, not arccosine

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
Comment on lines +187 to 197
for (int i=0; i<expectedBindVariables.size(); i++) {
Object expectedValue = expectedBindVariables.get(i);
BindMarkerNode bindMarker = collectBindMarkersInto.get(i);

if (!bindMarker.checkTypeAndValue(expectedValue)) {
StringBuilder msg = new StringBuilder();
msg.append("BIND[").append(i).append("] ")
.append("EXPECTED=").append(expectedValue)
.append("; ACTUAL=").append(bindMarker.toValueString("~"));
fail(msg.toString());
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

common code?

Copy link
Member Author

Choose a reason for hiding this comment

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

for sure. and its actually common across multiple tests, but maybe we settle on a private helper in each one for now?

Copy link
Member Author

Choose a reason for hiding this comment

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

nm, i went ahead an normalized them all. lots of deleted lines, so i think it was worth it

@@ -257,7 +266,8 @@ public void testPrecisionWithExact() throws Exception {

}

@Test
// the new query builder cannot generate a where fragment that starts with AND
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just start the whereFragment with 1=1 before handing it to the behavior impl?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, good idea. and i think i can encapsulate it in the runTest helper methods so that the individual test cases can look clean

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@lmsurpre lmsurpre merged commit b0f57c5 into main Oct 22, 2021
@lmsurpre lmsurpre deleted the issue-2728 branch October 22, 2021 18:40
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.

NewLastUpdatedParmBehaviorUtil.buildNotEqualsRangeClause generates invalid query data
4 participants