olavloite / spanner-jdbc

JDBC Driver for Google Cloud Spanner
MIT License
38 stars 10 forks source link

ReadContext.executeQuery() runs forever in case of bad database or instance #138

Closed jeffersonatsafe closed 4 years ago

jeffersonatsafe commented 4 years ago

driver version: 1.1.5 environment: Windows 10 x64

issue: When a wrong database or instance was specified, seems that the driver will run forever when running a Query. An error and a stacktrace will be logged, but the process will not terminate and an exception is not thrown.

steps to repro:

  1. create a jdbc connection using the proper credentials, but introduce a typo in either the instance name or the database name
  2. using the connection object, create a statement
  3. statement.executeQuery("SQL query here")

results: statement.executeQuery() never completes

expected: statement.executeQuery() completes and an exception is thrown

olavloite commented 4 years ago

This should now be fixed in 1.1.6.