-
Notifications
You must be signed in to change notification settings - Fork 79
Expose async persistence in FFI #1287
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
base: master
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 21396851139Details
💛 - Coveralls |
b9ab24b to
aee5749
Compare
|
I see the integration test is skipping. In CI: and local: ======================================================================
ERROR: test.test_payjoin_integration_test (unittest.loader._FailedTest.test.test_payjoin_integration_test)
----------------------------------------------------------------------
ImportError: Failed to import test module: test.test_payjoin_integration_test
Traceback (most recent call last):
File "/opt/homebrew/Cellar/python@3.13/3.13.3/Frameworks/Python.framework/Versions/3.13/lib/python3.13/unittest/loader.py", line 396, in _find_test_path
module = self._get_module_from_name(name)
File "/opt/homebrew/Cellar/python@3.13/3.13.3/Frameworks/Python.framework/Versions/3.13/lib/python3.13/unittest/loader.py", line 339, in _get_module_from_name
__import__(name)
~~~~~~~~~~^^^^^^
File "/Users/dan/f/dev/payjoin/payjoin-ffi/python/test/test_payjoin_integration_test.py", line 11, in <module>
import payjoin.bitcoin as bitcoinffi
File "/Users/dan/f/dev/payjoin/payjoin-ffi/python/src/payjoin/bitcoin.py", line 645, in <module>
_UniffiLib.uniffi_bitcoin_ffi_fn_clone_address.argtypes = (
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.13/3.13.3/Frameworks/Python.framework/Versions/3.13/lib/python3.13/ctypes/__init__.py", line 403, in __getattr__
func = self.__getitem__(name)
File "/opt/homebrew/Cellar/python@3.13/3.13.3/Frameworks/Python.framework/Versions/3.13/lib/python3.13/ctypes/__init__.py", line 408, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(0x6d0d1d60, uniffi_bitcoin_ffi_fn_clone_address): symbol not foundIs this entirely intentional? It was added in cc45199 #1191. I don't see discussion of just skipping the integration test there but still passing CI. Is this the intended behavior @chavic? |
DanGould
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the python tests no-ops accidentally, that's the only thing I'd really want to fix.
Would be nice to have save/load/close coverage in FFI but for now imo it's ok without.
Yeah, that's the expected behavior |
|
In that case, when do we run & maintain the integration tests? |
This exposes the async persistence methods in payjoin-ffi and accompanying unit tests in the downstream languages.
ee65092 to
2f94194
Compare
arminsabouri
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed on inconsistency in the dart unit tests. Otherwise Ack .
| final result = await payjoin.replayReceiverEventLogAsync(persister); | ||
| expect( | ||
| result, | ||
| isA<payjoin.ReplayResult>(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to assert a specific state like we do in the other tests?
IIRC the persister lifecycle is covered in the integration tests. |
O ya that seems sufficient as long as it's actually running edit: async & sync tho? |
currently sync only in integration tests. Same as in the core rust tests fwiw. Maybe worth revisiting at some point for fuller coverage. |
This exposes the async persistence methods in payjoin-ffi and accompanying unit tests in downstream languages.
I wanted to address #1199 so that we wouldn't duplicate all the hardcoded test values so much, but it turned out to be more involved than I anticipated (see my comment on that issue).
Pull Request Checklist
Please confirm the following before requesting review:
AI
in the body of this PR.