momentohq/client-sdk-rust

Integration tests are failing [blocks releases]

Opened this issue · 9 comments

First run, it failed trying to delete a cache.

Second run:

---- tests::create_list_revoke_signing_key stdout ----
thread 'tests::create_list_revoke_signing_key' panicked at 'couldn't revoke signing key: InternalServerError("transport error")', tests/integration_test.rs:243:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Third run:

---- tests::cache_respects_default_ttl stdout ----
thread 'tests::cache_respects_default_ttl' panicked at 'failed to delete cache: InternalServerError("transport error")', tests/integration_test.rs:147:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Fourth run... it completed.

thread 'tests::cache_respects_default_ttl' panicked at 'failed to create cache: InternalServerError("transport error")', tests/integration_test.rs:135:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: test failed, to rerun pass `--test integration_test`

---- tests::invalid_data_token_can_still_initialize_sdk stdout ----
thread 'tests::invalid_data_token_can_still_initialize_sdk' panicked at 'assertion failed: matches!(create_cache_result, MomentoError ::\n    Unauthenticated(_err_msg_unauthenticated))', tests/integration_test.rs:308:9

https://github.com/momentohq/client-sdk-rust/actions/runs/3999475545

thread 'tests::cache_respects_default_ttl' panicked at 'failed to create cache: InternalServerError("transport error")', tests/integration_test.rs:135:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: test failed, to rerun pass `--test integration_test`
---- tests::create_list_revoke_signing_key stdout ----
thread 'tests::create_list_revoke_signing_key' panicked at 'failed to create signing key: InternalServerError("http2 error: keep-alive timed out")', tests/integration_test.rs:207:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- tests::cache_respects_default_ttl stdout ----
thread 'tests::cache_respects_default_ttl' panicked at 'failed to delete cache: InternalServerError { description: "an unknown error terminated the request", source: TonicStatus(Status { code: Unknown, message: "transport error", source: Some(tonic::transport::Error(Transport, hyper::Error(Io, Kind(BrokenPipe)))) }) }', tests/integration_test.rs:131:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I am getting the same error for my prs

#133
#132

error: test failed, to rerun pass `--test integration_test`
---- tests::cache_miss stdout ----
thread 'tests::cache_miss' panicked at 'failed to create cache: InternalServerError { description: "an unknown error terminated the request", source: TonicStatus(Status { code: Unknown, message: "transport error", source: Some(tonic::transport::Error(Transport, hyper::Error(Io, Custom { kind: BrokenPipe, error: "stream closed because of a broken pipe" }))) }) }', tests/integration_test.rs:36:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- src/simple_cache_client.rs - simple_cache_client::SimpleCacheClient::set (line 500) stdout ----
Test executable failed (exit status: 1).

stderr:
Error: internal server error: an unknown error terminated the request

Caused by:
    0: tonic status error
    1: status: Unknown, message: "transport error", details: [], metadata: MetadataMap { headers: {} }
    2: transport error
    3: connection error: stream closed because of a broken pipe
    4: stream closed because of a broken pipe



failures:
    src/simple_cache_client.rs - simple_cache_client::SimpleCacheClient::list_pop_back (line 1390)
    src/simple_cache_client.rs - simple_cache_client::SimpleCacheClient::set (line 500)
error: test failed, to rerun pass `--test integration_test`
failures:

---- tests::cache_respects_default_ttl stdout ----
thread 'tests::cache_respects_default_ttl' panicked at 'failed to create cache: InternalServerError { description: "service unavailable", source: TonicStatus(Status { code: Unavailable, message: "http2 error: keep-alive timed out", source: Some(tonic::transport::Error(Transport, hyper::Error(Http2, KeepAliveTimedOut))) }) }', tests/integration_test.rs:119:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I have fixed this in this pr #132, by switching to macos-latest build image. This solution isnt ideal because the macos image is 10x more expensive than the ubuntu image, but it has at least unblocked us from releasing the rust sdk