Skip to content

Commit

Permalink
Merge pull request #23 from ayeshLK/main
Browse files Browse the repository at this point in the history
Fix test failures
  • Loading branch information
ayeshLK authored Feb 25, 2025
2 parents 7e5f8db + 65b688a commit e39f67c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions ballerina/tests/get_statement_result_test.bal
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,15 @@ isolated function testSupportedTypes() returns error? {
(${data.intType}, ${data.bigintType}, ${data.doubleType}, ${data.booleanType},
${data.stringType}, ${data.nilType}
);`;
_ = check redshiftData->execute(insertQuery);
ExecutionResponse insertStmResponse = check redshiftData->execute(insertQuery);
DescriptionResponse insertStmResult = check waitForCompletion(redshiftData, insertStmResponse.statementId);
test:assertEquals(insertStmResult.status, FINISHED);

sql:ParameterizedQuery selectQuery = `SELECT * FROM SupportedTypes;`;
ExecutionResponse res = check redshiftData->execute(selectQuery);
DescriptionResponse descriptionResponse = check waitForCompletion(redshiftData, res.statementId);
test:assertEquals(descriptionResponse.status, FINISHED);
stream<SupportedTypes, Error?> queryResult = check redshiftData->getResultAsStream(res.statementId);
ExecutionResponse selectQueryResponse = check redshiftData->execute(selectQuery);
DescriptionResponse selectQueryResult = check waitForCompletion(redshiftData, selectQueryResponse.statementId);
test:assertEquals(selectQueryResult.status, FINISHED);
stream<SupportedTypes, Error?> queryResult = check redshiftData->getResultAsStream(selectQueryResponse.statementId);

SupportedTypes[] resultArray = check from SupportedTypes item in queryResult
select item;
Expand Down

0 comments on commit e39f67c

Please sign in to comment.