GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Adding a new test for beginRequest()/endRequest() by ulvii · Pull Request #746 · microsoft/mssql-jdbc

Conversation

@ulvii

@ulvii ulvii commented Jul 12, 2018

Copy link
Copy Markdown
Contributor

The goal is to make the build fail if there are new public non-static methods in SQLServerConnection and notify the developer to decide whether it needs to be handled by beginRequest()/endRequest().

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ulvii added 3 commits July 11, 2018 19:05
@ulvii
Add | Adding a new test to notify the developers to consider beginReq…
ffd8061
…uest()/endRequest() when adding a new Connection API
@ulvii
Fix | rewording some comments
c5e54ff
@ulvii
Fix | Fix typo
fe9b9f8
@codecov-io

Codecov (codecov-io) commented Jul 12, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

Merging #746 into dev will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev     #746      +/-   ##
============================================
+ Coverage     48.35%   48.39%   +0.03%     
- Complexity     2775     2776       +1     
============================================
  Files           116      116              
  Lines         27871    27871              
  Branches       4631     4631              
============================================
+ Hits          13478    13488      +10     
+ Misses        12210    12199      -11     
- Partials       2183     2184       +1
Flag Coverage Δ Complexity Δ
#JDBC42 47.86% <ø> (ø) 2735 <ø> (+3) ⬆️
#JDBC43 48.27% <ø> (+0.06%) 2768 <ø> (+2) ⬆️
Impacted Files Coverage Δ Complexity Δ
...om/microsoft/sqlserver/jdbc/SQLServerBulkCopy.java 52.6% <0%> (ø) 262% <0%> (ø) ⬇️
...in/java/com/microsoft/sqlserver/jdbc/IOBuffer.java 53.83% <0%> (+0.09%) 0% <0%> (ø) ⬇️
...m/microsoft/sqlserver/jdbc/SQLServerResultSet.java 32.34% <0%> (+0.11%) 249% <0%> (+1%) ⬆️
...ncurrentlinkedhashmap/ConcurrentLinkedHashMap.java 39% <0%> (+0.21%) 43% <0%> (ø) ⬇️
...rc/main/java/com/microsoft/sqlserver/jdbc/DDC.java 45.95% <0%> (+0.65%) 107% <0%> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 594e413...fe9b9f8. Read the comment docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

peterbae
Peter Bae (peterbae) reviewed Jul 12, 2018
View reviewed changes
Comment thread src/test/java/com/microsoft/sqlserver/jdbc/connection/RequestBoundaryMethodsTest.java

private boolean isVerified(Method method) {
return (!Modifier.isPublic(method.getModifiers()) || Modifier.isStatic(method.getModifiers())
|| method.getName().startsWith("get") || getVerifiedMethodNames().contains(method.getName()));

@peterbae Peter Bae (peterbae) Jul 12, 2018

Copy link
Copy Markdown
Contributor

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.

why do we allow any method that starts with "get" to be verified? if I added a new connection property and added a public getter for it, isn't it something that the boundary request method needs to handle? (it would likely get caught by the setter that comes with it, though)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@rene-ye v-reye (rene-ye) Jul 12, 2018

Copy link
Copy Markdown
Member

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.

The point of beginRequest() is to "memorize" the connection state and its properties. Getting a connection property doesn't affect the properties so it shouldn't matter. On the other hand, it is kind of hacky and I wouldn't be opposed to triggering this error on all newly added public methods, just to be safe.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@ulvii ulvii Jul 12, 2018

Copy link
Copy Markdown
Contributor Author

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.

Well, a getter won't change the connection local state. And I didn't want to hard-code all of them in the test.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
rene-ye
v-reye (rene-ye) approved these changes Jul 12, 2018
View reviewed changes
peterbae
Peter Bae (peterbae) approved these changes Jul 12, 2018
View reviewed changes
cheenamalhotra
Cheena Malhotra (cheenamalhotra) approved these changes Jul 12, 2018
View reviewed changes
lilgreenbird
lilgreenbird (lilgreenbird) approved these changes Jul 12, 2018
View reviewed changes
@ulvii
ulvii merged commit 521e6b3 into microsoft:dev Jul 12, 2018
@ulvii
ulvii deleted the reqBoundary branch July 12, 2018 18:51
@cheenamalhotra Cheena Malhotra (cheenamalhotra) added this to the 7.0.0 milestone Jul 13, 2018
Cheena Malhotra (cheenamalhotra) added a commit that referenced this pull request Jul 31, 2018
@cheenamalhotra
Update master post RTW 7.0 release (#766)
9106feb
* Update Snapshot for upcoming RTW release v7.0.0

* Change order of logic for checking the condition for using Bulk Copy API (#736)

Fix | Change order of logic for checking the condition for using Bulk Copy API (#736)

* Update CHANGELOG.md

* Merge pull request #732 from cheenamalhotra/module (Export driver in automatic module)

Introduce Automatic Module Name in POM.

* Update CHANGELOG.md

* Change Sha1HashKey to CityHash128Key for generating PreparedStatement handle and metadata cache keys (#717)

* Change Sha1HashKey to CityHash128Key

* Formatted code

* Prepared statement performance fixes

1) Further speedups to prepared statement hashing

2) Caching of '?' chararacter positiobs in prepared statements to speed parameter substitution

* String compare for hash keys
added missing line for bulkcopy tests.

* comment change

* Move CityHash class to a separate file

* spacings fixes
cleaner code & logic

* Add | Adding useBulkCopyForBatchInsert property to Request Boundary methods (#739)

* Apply the collation name change to UTF8SupportTest

* Package changes for CityHash with license information (#740)

* Reformatted Code + Updated formatter (#742)

* Reformatted Code + Updated formatter

* Fix policheck issue with 'Country' keyword (#745)

* Adding a new test for beginRequest()/endRequest() (#746)

* Add | Adding a new test to notify the developers to consider beginRequest()/endRequest() when adding a new Connection API

* Fix | Fixes for issues reported by static analysis tools (SonarQube + Fortify) (#747)

* handle buffer reading

for invalid buffer input by user

* Revert "handle buffer reading"

This reverts commit 11e2bf4.

* updated javadocs (#754)

* fixed some typos in javadocs (#760)

* API and JavaDoc changes for Spatial Datatypes (#752)

Add | API and JavaDoc changes for Spatial Datatypes (#752)

* Disallow non-parameterized queries for Bulk Copy API for batch insert (#756)

fix | Disallow non-parameterized queries for Bulk Copy API for batch insert (#756)

* Formatting | Change scope of unwanted Public APIs + Code Format (#757)

* Fix unwanted Public APIs.
* Updated formatter to add new line to EOF + formatted project

* Release | Release 7.0 changelog and version update (#748)

* Updated Changelog + release version changes

* Changelog entry updated as per review.

* Updated changelog for new changes

* Terminology update: request boundary declaration APIs

* Trigger Appveyor

* Update Samples and add new samples for new features (#761)

* Update Samples and add new Samples for new features

* Update samples from Peter

* Updated JavaDocs

* Switch to block comment

* Update License copyright (#767)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cheenamalhotra Cheena Malhotra (cheenamalhotra) cheenamalhotra approved these changes
+3 more reviewers
@rene-ye v-reye (rene-ye) rene-ye approved these changes
@lilgreenbird lilgreenbird (lilgreenbird) lilgreenbird approved these changes
@peterbae Peter Bae (peterbae) peterbae approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

7.0.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@ulvii @codecov-io @rene-ye @lilgreenbird @cheenamalhotra @peterbae
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.