Skip to content

Commit 7a715b4

Browse files
authored
fix: re-adds test verifyStatementsInFile (#1181)
Re-adds verifyStatementsInFile with old signature and marks it asdeprecated.
1 parent cbf6544 commit 7a715b4

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AbstractSqlScriptVerifier.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,27 @@ public void verifyStatementsInFile(String filename, Class<?> resourceClass) thro
241241
this.verifyStatementsInFile(filename, resourceClass, false);
242242
}
243243

244+
/**
245+
* Reads sql statements from the specified file name and executes and verifies these. Statements
246+
* that are preceded by an @EXPECT statement are verified against the @EXPECT specification.
247+
* Statements without an @EXPECT statement will be executed and its result will be ignored, unless
248+
* the statement throws an exception, which will fail the test case.
249+
*
250+
* @param providedConnection The {@link com.google.cloud.spanner.jdbc.Connection} to execute the
251+
* statements against
252+
* @param filename The file name containing the statements. Statements must be separated by a
253+
* semicolon (;)
254+
* @param resourceClass The class that defines the package where to find the input file
255+
* @deprecated use {@link AbstractSqlScriptVerifier#verifyStatementsInFile(GenericConnection,
256+
* String, Class)})} instead. This method does not allow parallel batch execution.
257+
*/
258+
@Deprecated
259+
public void verifyStatementsInFile(
260+
GenericConnection providedConnection, String filename, Class<?> resourceClass)
261+
throws Exception {
262+
this.verifyStatementsInFile(providedConnection, filename, resourceClass, false);
263+
}
264+
244265
/**
245266
* Reads sql statements from the specified file name and executes and verifies these. Statements
246267
* that are preceded by an @EXPECT statement are verified against the @EXPECT specification.

0 commit comments

Comments
 (0)