You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What would you like to be added:
To resolve this problem, it is necessary to modify all the functions defined in getty.Connection to be exported with uppercase names.
Why is this needed:
Seata-go references getty, and encountered obstacles when writing unit tests related to the getty.Session interface. Neither gomock nor gomonkey can mock the getty.Session interface.
The issue arises from the fact that the getty.Connection interface defines lowercase unexported functions, and the getty.Session interface composes getty.Connection, making it impossible to mock getty.Session from outside the getty package.
The text was updated successfully, but these errors were encountered:
gomonkey can stub non-exported private functions, but the prerequisite is to have a struct instance. Due to the aforementioned issue with getty.Connection, it's not possible to create a getty.Session interface instance outside the getty package.
What would you like to be added:
To resolve this problem, it is necessary to modify all the functions defined in getty.Connection to be exported with uppercase names.
Why is this needed:
Seata-go references getty, and encountered obstacles when writing unit tests related to the getty.Session interface. Neither gomock nor gomonkey can mock the getty.Session interface.
The issue arises from the fact that the getty.Connection interface defines lowercase unexported functions, and the getty.Session interface composes getty.Connection, making it impossible to mock getty.Session from outside the getty package.
The text was updated successfully, but these errors were encountered: