ballerina-lang icon indicating copy to clipboard operation
ballerina-lang copied to clipboard

adding assertion changes to handle using org.testing.Assert module

Open someshfengde opened this issue 1 year ago • 7 comments
trafficstars

Purpose

Replace assert statements with a proper assertion error

Fixes #41480

Approach

used org.testing.Assert

Check List

someshfengde avatar Oct 04 '24 06:10 someshfengde

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


someshfengde seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Oct 04 '24 06:10 CLAassistant

yes checked it just pushed the latest version of code I have in local

On Mon, Oct 7, 2024 at 1:05 PM Ravin Perera @.***> wrote:

@.**** commented on this pull request.

In compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/BIRPackageSymbolEnter.java https://github.com/ballerina-platform/ballerina-lang/pull/43454#discussion_r1789689371 :

@@ -1314,7 +1315,7 @@ public BType readType(int cpI) throws IOException { // setDocumentation(varSymbol, attrData); // TODO fix

                 Object poppedRecordType = compositeStack.pop();
  •                assert poppedRecordType == recordType;
    
  •                org.testng.Assert.assertEquals(poppedRecordType, recordType, "Popped record type does not match the expected record type.");
    

From what I can see, you have imported a package called org.testing.Assert and not org.testng.Assert. Are you sure the required package was imported?

— Reply to this email directly, view it on GitHub https://github.com/ballerina-platform/ballerina-lang/pull/43454#discussion_r1789689371, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKBFX5NYIBCNHVQCFA2VL3DZ2I2VTAVCNFSM6AAAAABPLHXCN2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGNJRGE2DINBWGQ . You are receiving this because you were mentioned.Message ID: @.*** com>

someshfengde avatar Oct 07 '24 07:10 someshfengde

yes checked it just pushed the latest version of code I have in local On Mon, Oct 7, 2024 at 1:05 PM Ravin Perera @.> wrote: @.* commented on this pull request. ------------------------------ In compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/BIRPackageSymbolEnter.java <#43454 (comment)> : > @@ -1314,7 +1315,7 @@ public BType readType(int cpI) throws IOException { // setDocumentation(varSymbol, attrData); // TODO fix Object poppedRecordType = compositeStack.pop(); - assert poppedRecordType == recordType; + org.testng.Assert.assertEquals(poppedRecordType, recordType, "Popped record type does not match the expected record type."); From what I can see, you have imported a package called org.testing.Assert and not org.testng.Assert. Are you sure the required package was imported? — Reply to this email directly, view it on GitHub <#43454 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKBFX5NYIBCNHVQCFA2VL3DZ2I2VTAVCNFSM6AAAAABPLHXCN2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGNJRGE2DINBWGQ . You are receiving this because you were mentioned.Message ID: @.*** com>

@someshfengde Hello! As @ravinperera00 mentioned, please read the best practices for contributing to this repo here I have noticed that your commit message does not follow the standards. For example, your last commit message testng update should be amended as Update testng package

gimantha avatar Oct 07 '24 08:10 gimantha

@someshfengde Hope you are working on this issue. Let us know if you are stuck with something

gimantha avatar Oct 10 '24 05:10 gimantha

@someshfengde Hi, Are you working on this pull request?

gimantha avatar Oct 23 '24 05:10 gimantha

@someshfengde Hi, Are you working on this pull request?

Build is failing when I tried not sure how to proceed further

someshfengde avatar Oct 23 '24 05:10 someshfengde

@someshfengde Can you join our Discord and drop a question there (in the Hactoberfest channel). Tell us where you are stuck and the problems you are facing. Our community should be able to help you proceed through that. Mentioning your problems there might help others who are facing similar issues as well.

ravinperera00 avatar Oct 25 '24 04:10 ravinperera00

@someshfengde Please reopen the PR if you are going to continue work on this task. Till then, we are going close the PR.

gimantha avatar Nov 22 '24 08:11 gimantha