Skip to content

Commit

Permalink
Fix build failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Thevakumar-Luheerathan committed Apr 26, 2023
1 parent 7e8f394 commit a751e26
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
// under the License.

import ballerina/lang.'error as langError;
boolean shouldSkip = false;
import ballerina/lang.runtime;

isolated boolean shouldSkip = false;
boolean shouldAfterSuiteSkip = false;
isolated int exitCode = 0;
Expand Down Expand Up @@ -253,7 +254,7 @@ function executeDataDrivenTest(TestFunction testFunction, string suffix, TestTyp
lock {
reportData.onFailed(name = testFunction.name, suffix = suffix, message = "[fail data provider for the function " + testFunction.name
+ "]\n" + getErrorMessage(err), testType = testType);
enableExit();
enableExit();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public static void main(String[] args) throws IOException {
result = startTestSuit(Paths.get(testSuite.getSourceRootPath()), testSuite, classLoader,
new TestArguments(args[0], packageName, moduleName,
args[2], args[3], args[4], args[5], args[6], args[7],
args[8], args[9]), Arrays.copyOfRange(args, 9, args.length));
args[8], args[9]), Arrays.copyOfRange(args, 10, args.length));
exitStatus = (result == 1) ? result : exitStatus;
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,9 @@ Running Tests with Coverage
callableName: testDividingValuesNegative moduleName: intg_tests.dataproviders$test.0.tests.new-data-provider-tests fileName: tests/new-data-provider-tests.bal lineNumber: 191
callableName: testDividingValuesNegative$lambda14$ moduleName: intg_tests.dataproviders$test.0.tests.test_execute-generated_*****lineNumber: 17
",functionName="testDividingValuesNegative")
callableName: executeTestFunction moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 353
callableName: executeDataDrivenTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 140
callableName: executeDataDrivenTestSet moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 127
callableName: executeTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 87
callableName: executeTests moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 62
callableName: startSuite moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 46
callableName: __execute__ moduleName: intg_tests.dataproviders$test.0.tests.test_execute-generated_*****lineNumber: 26
callableName: executeTestFunction moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 477
callableName: executeDataDrivenTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 252
callableName: prepareDataDrivenTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 241



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,26 @@ Running Tests

before-groups-after-groups-test2.bal
[fail] afterSuiteFunc[after test suite function]:
Assertion Failed!

expected: '123456787'
actual : '123467587'

Diff :

--- actual
+++ expected

@@ -1,1 +1,1 @@

-123467587
+123456787

error {ballerina/test:0}TestError ("Assertion Failed!

expected: '123456787'
actual : '123467587'

Diff :

--- actual
+++ expected

@@ -1,1 +1,1 @@

-123467587
+123456787
")
callableName: createBallerinaError moduleName: ballerina.test.0 fileName: assert.bal lineNumber: 41
callableName: assertEquals moduleName: ballerina.test.0 fileName: assert.bal lineNumber: 109
callableName: afterSuiteFunc fileName: before-groups-after-groups-test2.bal lineNumber: 80
callableName: afterSuiteFunc$lambda9$ fileName: before-groups-after-groups-test2.bal lineNumber: 91

[pass] testFunction
[pass] testFunction2
[pass] testFunction4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,13 @@ Running Tests
[fail data provider for the function testInvalidDataProvider]
error {ballerina/test:0}ExecutionError ("error("{ballerina/lang.function}IncompatibleArguments",message="arguments of incompatible types: argument list '(int)' cannot be passed to function expecting parameter list '(string)'")
callableName: call moduleName: ballerina.lang.function.0 fileName: function.bal lineNumber: 37
callableName: executeTestFunction moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 343
callableName: executeDataDrivenTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 140
callableName: executeDataDrivenTestSet moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 127
callableName: executeTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 87
callableName: executeTests moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 62
callableName: startSuite moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 46
callableName: __execute__ fileName: invalid-data-provider-test.bal lineNumber: 36
callableName: executeTestFunction moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 463
callableName: executeDataDrivenTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 252
callableName: prepareDataDrivenTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 241
",functionName="testInvalidDataProvider")
callableName: executeTestFunction moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 353
callableName: executeDataDrivenTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 140
callableName: executeDataDrivenTestSet moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 127
callableName: executeTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 87
callableName: executeTests moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 62
callableName: startSuite moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 46
callableName: __execute__ fileName: invalid-data-provider-test.bal lineNumber: 36
callableName: executeTestFunction moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 477
callableName: executeDataDrivenTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 252
callableName: prepareDataDrivenTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 241



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,13 @@ Running Tests
[fail data provider for the function testInvalidDataProvider2]
error {ballerina/test:0}ExecutionError ("error("{ballerina/lang.function}IncompatibleArguments",message="arguments of incompatible types: argument list '(int,int,int)' cannot be passed to function expecting parameter list '(string,string,string)'")
callableName: call moduleName: ballerina.lang.function.0 fileName: function.bal lineNumber: 37
callableName: executeTestFunction moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 343
callableName: executeDataDrivenTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 140
callableName: executeDataDrivenTestSet moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 127
callableName: executeTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 87
callableName: executeTests moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 62
callableName: startSuite moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 46
callableName: __execute__ fileName: invalid-data-provider-test2.bal lineNumber: 38
callableName: executeTestFunction moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 463
callableName: executeDataDrivenTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 252
callableName: prepareDataDrivenTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 241
",functionName="testInvalidDataProvider2")
callableName: executeTestFunction moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 353
callableName: executeDataDrivenTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 140
callableName: executeDataDrivenTestSet moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 127
callableName: executeTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 87
callableName: executeTests moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 62
callableName: startSuite moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 46
callableName: __execute__ fileName: invalid-data-provider-test2.bal lineNumber: 38
callableName: executeTestFunction moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 477
callableName: executeDataDrivenTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 252
callableName: prepareDataDrivenTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 241



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,13 @@ Running Tests
[fail data provider for the function testInvalidTupleDataProvider]
error {ballerina/test:0}ExecutionError ("error("{ballerina/lang.function}IncompatibleArguments",message="arguments of incompatible types: argument list '(string,int)' cannot be passed to function expecting parameter list '(string,string)'")
callableName: call moduleName: ballerina.lang.function.0 fileName: function.bal lineNumber: 37
callableName: executeTestFunction moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 343
callableName: executeDataDrivenTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 140
callableName: executeDataDrivenTestSet moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 127
callableName: executeTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 87
callableName: executeTests moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 62
callableName: startSuite moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 46
callableName: __execute__ fileName: invalid-data-provider-test3.bal lineNumber: 35
callableName: executeTestFunction moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 463
callableName: executeDataDrivenTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 252
callableName: prepareDataDrivenTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 241
",functionName="testInvalidTupleDataProvider")
callableName: executeTestFunction moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 353
callableName: executeDataDrivenTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 140
callableName: executeDataDrivenTestSet moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 127
callableName: executeTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 87
callableName: executeTests moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 62
callableName: startSuite moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 46
callableName: __execute__ fileName: invalid-data-provider-test3.bal lineNumber: 35
callableName: executeTestFunction moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 477
callableName: executeDataDrivenTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 252
callableName: prepareDataDrivenTest moduleName: ballerina.test.0 fileName: execute.bal lineNumber: 241



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,28 @@ Running Tests
error("{ballerina}DivisionByZero",message=" / by zero")
callableName: afterFunc fileName: skip-when-after-fails.bal lineNumber: 30
callableName: afterFunc$lambda6$ fileName: skip-when-after-fails.bal lineNumber: 35

[fail] afterSuite[after test suite function]:
error {ballerina/test:0}TestError ("Assertion Failed!

expected: 'beforetestafterEachtestafterEach'
actual : 'beforetestafterEachtestafterEachafterEach'

Diff :

--- actual
+++ expected

@@ -1,1 +1,1 @@

+++ expected
@@ -1,1 +1,1 @@
-beforetestafterEachtestafterEachafterEach
+beforetestafterEachtestafterEach
")
callableName: createBallerinaError moduleName: ballerina.test.0 fileName: assert.bal lineNumber: 41
callableName: assertEquals moduleName: ballerina.test.0 fileName: assert.bal lineNumber: 109
callableName: afterSuite fileName: skip-when-after-fails.bal lineNumber: 57
callableName: afterSuite$lambda5$ fileName: skip-when-after-fails.bal lineNumber: 64

[pass] test1
[pass] test3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,28 @@ Running Tests
error("{ballerina}DivisionByZero",message=" / by zero")
callableName: before fileName: skip-when-before-fails.bal lineNumber: 28
callableName: before$lambda6$ fileName: skip-when-before-fails.bal lineNumber: 32

[fail] afterSuite[after test suite function]:
error {ballerina/test:0}TestError ("Assertion Failed!

expected: 'beforetest3afterEach'
actual : 'beforeafterEachtest3afterEachafterEach'

Diff :

--- actual
+++ expected

@@ -1,1 +1,1 @@

+++ expected
@@ -1,1 +1,1 @@
-beforeafterEachtest3afterEachafterEach
+beforetest3afterEach
")
callableName: createBallerinaError moduleName: ballerina.test.0 fileName: assert.bal lineNumber: 41
callableName: assertEquals moduleName: ballerina.test.0 fileName: assert.bal lineNumber: 109
callableName: afterSuite fileName: skip-when-before-fails.bal lineNumber: 54
callableName: afterSuite$lambda5$ fileName: skip-when-before-fails.bal lineNumber: 61

[pass] test3


Expand Down

0 comments on commit a751e26

Please sign in to comment.