Re-enable HTTP and Redis tests#132
Conversation
2efd5f6 to
0c21e2a
Compare
|
I think the root cause is that This seems to work: let (status, resp_body) = store
.run_concurrent(async |store| {
let (res, ()) = tokio::try_join!(
async {
let res = http_service.handle(store, request).await??;
let res = store.with(|store| res.into_http(store, async { Ok(()) }))?;
let status = res.status();
let body = res.into_body().collect().await?;
anyhow::Ok((status, body.to_bytes()))
},
async {
io.await.map_err(|e| anyhow::anyhow!("{e:?}"))
}
)?;
anyhow::Ok(res)
})
.await??;
assert!(status.is_success());
assert_eq!(resp_body.as_ref(), b"Hello, world!"); |
|
Right, as discussed in spinframework/spin#3454, the |
|
Oh that might affect the Redis trigger then - when I did that I just called |
|
Thanks all - I appreciate both the explanation for understanding, and the helpful fix! |
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
0c21e2a to
3bdeedb
Compare
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
@fibonacci1729 Right now, this fails because the test response body appears empty (when it is expected to be a "Hello world" message). I can't see what I need to change though - my guess is that something needs to flush or wait longer or something, but I thoughtcollect()would do that for me. Would you mind giving it a once-over to see where my understanding has gone awry please? Thanks (and sorry for loading this on your plate)!Re-enables HTTP and Redis tests. Thank you Brian and Joel for your help!