Skip to content

Commit

Permalink
Merge pull request #699 from niveathika/master
Browse files Browse the repository at this point in the history
Temporarily disable testInvalidConnectionParamConfig test
  • Loading branch information
niveathika authored Dec 12, 2023
2 parents 8a4dd64 + fd84b5f commit ad388b1
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 26 deletions.
8 changes: 4 additions & 4 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
org = "ballerina"
name = "sql"
version = "1.11.1"
version = "1.11.2"
authors = ["Ballerina"]
keywords = ["database", "client", "network", "SQL", "RDBMS"]
repository = "https://github.com/ballerina-platform/module-ballerina-sql"
Expand All @@ -15,11 +15,11 @@ graalvmCompatible = true
[[platform.java17.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "sql-native"
version = "1.11.1"
path = "../native/build/libs/sql-native-1.11.1.jar"
version = "1.11.2"
path = "../native/build/libs/sql-native-1.11.2-SNAPSHOT.jar"

[[platform.java17.dependency]]
path = "../test-utils/build/libs/sql-test-utils-1.11.1.jar"
path = "../test-utils/build/libs/sql-test-utils-1.11.2-SNAPSHOT.jar"
scope = "testOnly"

[[platform.java17.dependency]]
Expand Down
2 changes: 1 addition & 1 deletion ballerina/CompilerPlugin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ id = "sql-compiler-plugin"
class = "io.ballerina.stdlib.sql.compiler.SQLCompilerPlugin"

[[dependency]]
path = "../compiler-plugin/build/libs/sql-compiler-plugin-1.11.1.jar"
path = "../compiler-plugin/build/libs/sql-compiler-plugin-1.11.2-SNAPSHOT.jar"
7 changes: 4 additions & 3 deletions ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "constraint"
version = "1.4.0"
version = "1.5.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
Expand Down Expand Up @@ -69,7 +69,7 @@ modules = [
[[package]]
org = "ballerina"
name = "http"
version = "2.10.0"
version = "2.10.5"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "auth"},
Expand Down Expand Up @@ -111,6 +111,7 @@ modules = [
org = "ballerina"
name = "jballerina.java"
version = "0.0.0"
scope = "testOnly"
modules = [
{org = "ballerina", packageName = "jballerina.java", moduleName = "jballerina.java"}
]
Expand Down Expand Up @@ -300,7 +301,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "sql"
version = "1.11.1"
version = "1.11.2"
dependencies = [
{org = "ballerina", name = "file"},
{org = "ballerina", name = "io"},
Expand Down
36 changes: 18 additions & 18 deletions ballerina/tests/execute-params-query-test.bal
Original file line number Diff line number Diff line change
Expand Up @@ -614,25 +614,25 @@ function insertIntoArrayTable3() returns error? {
groups: ["execute", "execute-params"]
}
function insertIntoArrayTable4() returns error? {
SmallIntArrayValue paraSmallint = new ([]);
IntegerArrayValue paraInt = new ([]);
BigIntArrayValue paraLong = new ([]);
FloatArrayValue paraFloat = new (<int?[]>[]);
RealArrayValue paraReal = new (<int?[]>[]);
DecimalArrayValue paraDecimal = new (<int?[]>[]);
NumericArrayValue paraNumeric = new (<int?[]>[]);
DoubleArrayValue paraDouble = new (<int?[]>[]);
CharArrayValue paraChar = new ([]);
VarcharArrayValue paraVarchar = new ([]);
NVarcharArrayValue paraNVarchar = new ([]);
SmallIntArrayValue paraSmallint = new ();
IntegerArrayValue paraInt = new ();
BigIntArrayValue paraLong = new ();
FloatArrayValue paraFloat = new ();
RealArrayValue paraReal = new ();
DecimalArrayValue paraDecimal = new ();
NumericArrayValue paraNumeric = new ();
DoubleArrayValue paraDouble = new ();
CharArrayValue paraChar = new ();
VarcharArrayValue paraVarchar = new ();
NVarcharArrayValue paraNVarchar = new ();
string?[] paraString = [];
BooleanArrayValue paraBool = new ([]);
DateArrayValue paraDate = new (<string?[]>[]);
TimeArrayValue paraTime = new (<string?[]>[]);
DateTimeArrayValue paraDatetime = new (<string?[]>[]);
TimestampArrayValue paraTimestamp = new (<string?[]>[]);
BinaryArrayValue paraBinary = new (<byte[]?[]>[]);
VarBinaryArrayValue paraVarBinary = new (<byte[]?[]>[]);
BooleanArrayValue paraBool = new ();
DateArrayValue paraDate = new ();
TimeArrayValue paraTime = new ();
DateTimeArrayValue paraDatetime = new ();
TimestampArrayValue paraTimestamp = new ();
BinaryArrayValue paraBinary = new ();
VarBinaryArrayValue paraVarBinary = new ();
byte[]?[] paraBlob = [];
int rowId = 8;

Expand Down
1 change: 1 addition & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ignore:
- "test-utils/"
- "compiler-plugin/"

coverage:
precision: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,19 @@ private Package loadPackage(String path) {
}

@Test
public void testCompilerErrors() {
Package currentPackage = loadPackage("sample3");
PackageCompilation compilation = currentPackage.getCompilation();
DiagnosticResult diagnosticResult = compilation.diagnosticResult();
List<Diagnostic> diagnosticErrorStream = diagnosticResult.diagnostics().stream()
.filter(r -> r.diagnosticInfo().severity().equals(DiagnosticSeverity.ERROR))
.collect(Collectors.toList());
long availableErrors = diagnosticErrorStream.size();

Assert.assertEquals(availableErrors, 1);
}

@Test(enabled = false)
public void testInvalidConnectionParamConfig() {
Package currentPackage = loadPackage("sample1");
PackageCompilation compilation = currentPackage.getCompilation();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[package]
org = "sql_test"
name = "sample1"
version = "0.1.0"
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
//
// WSO2 Inc. licenses this file to you under the Apache License,
// Version 2.0 (the "License"); you may not use this file except
// in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

import ballerina/sql;

type ConnectionPool record {
int connection?;
}

int|sql:ConnectionPool pool2 = {
maxOpenConnections: 10,
maxConnectionLifeTime: 10,
minIdleConnections: 2
};

public function main() {

}

0 comments on commit ad388b1

Please sign in to comment.