Skip to content

Commit

Permalink
Support Java SDK (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
koxudaxi committed Apr 24, 2021
1 parent 8a48f24 commit e964abd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Resource(
) {
private val connectionManager = ConnectionManager.INSTANCE

val connection = if (transactionId == null) {
val connection = if (transactionId == null || transactionId.isBlank()) {
connectionManager.createConnection(config.url, userName, password, database, schema, config.jdbcOptions)
} else {
connectionManager.getConnection(transactionId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class ApplicationTest {
withTestApplication({ module(testing = true) }) {
handleRequest(HttpMethod.Post, "/Execute") {
addHeader(HttpHeaders.ContentType, "*/*")
setBody(Json.encodeToString(ExecuteStatementRequest(dummyResourceArn, dummySecretArn, "select 1")))
setBody(Json.encodeToString(ExecuteStatementRequest(dummyResourceArn, dummySecretArn, "select 1", transactionId = "")))
}.apply {
assertEquals(HttpStatusCode.OK, response.status())
assertEquals(
Expand Down

0 comments on commit e964abd

Please sign in to comment.