-
Notifications
You must be signed in to change notification settings - Fork 3
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
Tests randomly failing after updating to 0.28 #18
Comments
Trying to debug this right now, it seems to be coming from async Swift code. I can't reproduce this locally, only in Github pipeline. Right now the fail happens in Originally the test uses In the Swift test file, the async task does not print let semaphore = DispatchSemaphore(value: 0)
print("AAAAAAAAAAAAAAAAAAAAAAA 6.1")
print("AAAAAAAAAAAAAAAAAAAAAAA 6.2")
Task {
print("BBBBBBBBBBBBBBBBBBBB 1")
// This async function comes from the `uniffi-one` crate
let uniffiOneEnum = await getUniffiOneAsync()
print("BBBBBBBBBBBBBBBBBBBB 2")
assert(uniffiOneEnum == UniffiOneEnum.one)
print("BBBBBBBBBBBBBBBBBBBB 3")
// This async function comes from the `proc-macro-lib` crate
let uniffiOneType = await getUniffiOneTypeAsync(t: UniffiOneType(sval: "hello"))
print("BBBBBBBBBBBBBBBBBBBB 4")
assert(uniffiOneType.sval == "hello")
print("BBBBBBBBBBBBBBBBBBBB 5")
semaphore.signal()
print("BBBBBBBBBBBBBBBBBBBB 6")
}
print("AAAAAAAAAAAAAAAAAAAAAAA 6.3")
semaphore.wait()
print("AAAAAAAAAAAAAAAAAAAAAAA 6.4")
print("AAAAAAAAAAAAAAAAAAAAAAA 7")
fflush(stdout)
|
Looks like timing related issue. Adding |
I tried to remove uniffi related calls from the async task, and the program stops crashing. So it's somehow uniffi related? |
https://github.com/NordSecurity/uniffi-rs/actions/runs/10850215015/job/30111115697
The text was updated successfully, but these errors were encountered: