Fixed output and skipifs

This commit is contained in:
David Puglielli 2018-07-11 11:29:34 -07:00
parent b2f7b206c5
commit 82be8141a3
8 changed files with 24 additions and 17 deletions

View file

@ -7,7 +7,7 @@ do not need to be encrypted
--ENV-- --ENV--
PHPT_EXEC=true PHPT_EXEC=true
--SKIPIF-- --SKIPIF--
<?php require('skipif.inc'); ?> <?php require('skipif_mid-refactor.inc'); ?>
--FILE-- --FILE--
<?php <?php
require_once("MsSetup.inc"); require_once("MsSetup.inc");

View file

@ -1,7 +1,7 @@
--TEST-- --TEST--
Test new connection keyword ColumnEncryption Test new connection keyword ColumnEncryption
--SKIPIF-- --SKIPIF--
<?php require('skipif.inc'); ?> <?php require('skipif_mid-refactor.inc'); ?>
--FILE-- --FILE--
<?php <?php
require_once("MsSetup.inc"); require_once("MsSetup.inc");

View file

@ -7,7 +7,8 @@ killing the connection and then not freeing it. The latter case is the only one
that should fail. Finally, execute two queries in two threads on a recovered that should fail. Finally, execute two queries in two threads on a recovered
non-MARS connection. This should fail too. non-MARS connection. This should fail too.
--SKIPIF-- --SKIPIF--
<?php require('skipif_protocol_not_tcp.inc'); <?php require('skipif_mid-refactor.inc');
require('skipif_protocol_not_tcp.inc');
require('skipif_version_less_than_2k14.inc'); ?> require('skipif_version_less_than_2k14.inc'); ?>
--FILE-- --FILE--
<?php <?php

View file

@ -1,7 +1,8 @@
--TEST-- --TEST--
Test the connection resiliency keywords ConnectRetryCount and ConnectRetryInterval and their ranges of acceptable values Test the connection resiliency keywords ConnectRetryCount and ConnectRetryInterval and their ranges of acceptable values
--SKIPIF-- --SKIPIF--
<?php require('skipif_version_less_than_2k14.inc'); ?> <?php require('skipif_mid-refactor.inc');
require('skipif_version_less_than_2k14.inc'); ?>
--FILE-- --FILE--
<?php <?php
require_once( "MsSetup.inc" ); require_once( "MsSetup.inc" );

View file

@ -5,7 +5,8 @@ Prepare a statement, break the connection, and execute the statement. Then
test transactions by breaking the connection before beginning a transaction test transactions by breaking the connection before beginning a transaction
and in the middle of the transaction. The latter case should fail. and in the middle of the transaction. The latter case should fail.
--SKIPIF-- --SKIPIF--
<?php require('skipif_protocol_not_tcp.inc'); <?php require('skipif_mid-refactor.inc');
require('skipif_protocol_not_tcp.inc');
require('skipif_version_less_than_2k14.inc'); ?> require('skipif_version_less_than_2k14.inc'); ?>
--FILE-- --FILE--
<?php <?php

View file

@ -4,7 +4,8 @@ Test connection resiliency timeouts
1. Connect with ConnectRetryCount equal to 0. 1. Connect with ConnectRetryCount equal to 0.
2. Reconnect with the default value of ConnectRetryCount(1). 2. Reconnect with the default value of ConnectRetryCount(1).
--SKIPIF-- --SKIPIF--
<?php require('skipif_protocol_not_tcp.inc'); <?php require('skipif_mid-refactor.inc');
require('skipif_protocol_not_tcp.inc');
require('skipif_version_less_than_2k14.inc'); ?> require('skipif_version_less_than_2k14.inc'); ?>
--FILE-- --FILE--
<?php <?php

View file

@ -11,16 +11,19 @@ if ($conn === false) {
} }
// Get SQL Server Version // Get SQL Server Version
$stmt = $conn->query( "SELECT @@VERSION" ); // Exclude this check if running on Azure
if ($stmt) { if (!$daasMode) {
$ver_string = $stmt->fetch(PDO::FETCH_NUM)[0]; $stmt = $conn->query( "SELECT @@VERSION" );
} else { if ($stmt) {
die( "skip Could not fetch SQL Server version during SKIPIF."); $ver_string = $stmt->fetch(PDO::FETCH_NUM)[0];
} } else {
die( "skip Could not fetch SQL Server version during SKIPIF.");
}
$version = explode(' ', $ver_string); $version = explode(' ', $ver_string);
if ($version[3] < '2014') { if ($version[3] < '2014') {
die("skip Wrong version of SQL Server, 2014 or later required"); die("skip Wrong version of SQL Server, 2014 or later required");
}
} }
?> ?>

View file

@ -189,8 +189,8 @@ Array
\[SQLSTATE\] => 08S02 \[SQLSTATE\] => 08S02
\[1\] => (10054|-1) \[1\] => (10054|-1)
\[code\] => (10054|-1) \[code\] => (10054|-1)
\[2\] => \[Microsoft\]\[ODBC Driver 1[1-9] for SQL Server\](TCP Provider: An existing connection was forcibly closed by the remote host\.\n|SMux Provider: Physical connection is not usable \[xFFFFFFFF\]) \[2\] => \[Microsoft\]\[ODBC Driver 1[1-9] for SQL Server\](TCP Provider: An existing connection was forcibly closed by the remote host\.\n|SMux Provider: Physical connection is not usable \[xFFFFFFFF\])\.
\[message\] => \[Microsoft\]\[ODBC Driver 1[1-9] for SQL Server\](TCP Provider: An existing connection was forcibly closed by the remote host\.\n|SMux Provider: Physical connection is not usable \[xFFFFFFFF\]) \[message\] => \[Microsoft\]\[ODBC Driver 1[1-9] for SQL Server\](TCP Provider: An existing connection was forcibly closed by the remote host\.\n|SMux Provider: Physical connection is not usable \[xFFFFFFFF\])\.
\) \)
\[1\] => Array \[1\] => Array