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

Added test case for Issue 699 #773

Merged
merged 7 commits into from
May 17, 2018
Merged

Added test case for Issue 699 #773

merged 7 commits into from
May 17, 2018

Conversation

yitam
Copy link
Contributor

@yitam yitam commented May 14, 2018

Related to #699


This change is Reviewable

@coveralls
Copy link

coveralls commented May 14, 2018

Coverage Status

Coverage remained the same at 73.151% when pulling 4747537 on yitam:Issue699Test into f835447 on Microsoft:dev.

@yitam yitam requested a review from david-puglielli May 14, 2018 17:39
@codecov-io
Copy link

codecov-io commented May 14, 2018

Codecov Report

Merging #773 into dev will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev     #773   +/-   ##
=======================================
  Coverage   78.92%   78.92%           
=======================================
  Files          25       25           
  Lines        7213     7213           
=======================================
  Hits         5693     5693           
  Misses       1520     1520

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 f835447...4747537. Read the comment docs.

--FILE--
<?php

if (strtoupper(substr(PHP_OS, 0, 3)) === 'LIN') {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it better to put this in a skipif?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, because this is supposed to be temporary, I hope :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed this part to add a workaround to make the test pass in Linux

while ($res = sqlsrv_next_result($stmt));

if ($outParam != 123) {
echo "The output param value $outParam is unexpected!\n";
Copy link
Contributor

Choose a reason for hiding this comment

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

I think display the $outParam here so we can see immediately what it is if it fails.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it is being printed in the echo stmt as $outParm

// This test, when running outside of Windows, requires unixODBC 2.3.4
// or above (see the list of bug fixes in www.unixodbc.org)
// Add this workaround for Linux platforms
$set_no_count = "SET NOCOUNT ON; ";
Copy link
Contributor

Choose a reason for hiding this comment

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

So this is the only thing that has to change to get the test to pass in Linux?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, because unixODBC later versions fixed some bugs related to "SQLMoreResults" or "SQL_NO_DATA". By setting nocount these calls are bypassed.

@yitam yitam merged commit 196fe49 into microsoft:dev May 17, 2018
@yitam yitam deleted the Issue699Test branch May 17, 2018 14:51
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.

4 participants