-
Notifications
You must be signed in to change notification settings - Fork 758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Bad sad error when the ballerina/test
import is below the import of a module of the mocked object
#42037
Comments
The same issue is reported with #41706 |
This failure is caused because the Hence in this case, when the package module While this is a limitation of the |
Closing this as a workaround was provided till the new mock interface in implemented. |
This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now. |
Description
Say we have 2 modules
db
anduser
.db
has a db client and it is being mocked in the tests ofuser
. When the import ofballerina/test
module is above the import ofdb
, there is a bad sad error.Steps to Reproduce
modules/db/db.bal
modules/user/test/testUser.bal
If we change the order of imports in
testUser.bal
, i.e.then the error is not there.
An explanation for this issue is given in https://github.com/wso2-enterprise/internal-support-ballerina/issues/504#issuecomment-1809568898
Affected Version(s)
No response
OS, DB, other environment details and versions
No response
Related area
-> Test Framework
Related issue(s) (optional)
https://github.com/wso2-enterprise/internal-support-ballerina/issues/567
https://github.com/wso2-enterprise/internal-support-ballerina/issues/504
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response
The text was updated successfully, but these errors were encountered: