Skip to content
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

2 failing tests in gax #12817

Open
peaceful-james opened this issue Jan 14, 2025 · 0 comments
Open

2 failing tests in gax #12817

peaceful-james opened this issue Jan 14, 2025 · 0 comments
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@peaceful-james
Copy link

Using Elixir 1.18.0 (compiled with Erlang/OTP 27).

cd clients/gax
mix test

Result:


  1) test basic request (Gax.ApiTest)
     test/gax/api_test.exs:30
     ** (Tesla.Mock.Error) Request not mocked

     The following request was not mocked:

     %Tesla.Env{
       method: :get,
       url: "https://example.com/v1/stores/store-1/pets",
       query: [],
       headers: [
         {"x-goog-api-client", "gl-elixir/1.18.0 gax/0.4.1 gdcl/1.2.3"},
         {"accept-encoding", "gzip, deflate, identity"}
       ],
       body: nil,
       status: nil,
       opts: [],
       __module__: TestClient.Connection,
       __client__: %Tesla.Client{
         fun: nil,
         pre: [],
         post: [],
         adapter: {Tesla.Mock, :call, [[]]}
       }
     }

     ** (FunctionClauseError) no function clause matching in anonymous fn/1 in Gax.ApiTest."test basic request"/1
         test/gax/api_test.exs:35: anonymous fn(%Tesla.Env{method: :get, url: "https://example.com/v1/stores/store-1/pets", query: [], headers: [{"x-goog-api-client", "gl-elixir/1.18.0 gax/0.4.1 gdcl/1.2.3"}, {"accept-encoding", "gzip, deflate, identity"}], body: nil, status: nil, opts: [], __module__: TestClient.Connection, __client__: %Tesla.Client{fun: nil, pre: [], post: [], adapter: {Tesla.Mock, :call, [[]]}}}) in Gax.ApiTest."test basic request"/1
         (tesla 1.13.2) lib/tesla/mock.ex:269: Tesla.Mock.rescue_call/2
         (tesla 1.13.2) lib/tesla/mock.ex:209: Tesla.Mock.call/2
         (tesla 1.13.2) lib/tesla/middleware/compression.ex:156: Tesla.Middleware.DecompressResponse.call/3
         (google_gax 0.4.1) test/test_client/api/pets.ex:35: TestClient.Api.Pets.pets_list_by_store/3
         test/gax/api_test.exs:44: Gax.ApiTest."test basic request"/1
         (ex_unit 1.18.0) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2
         (stdlib 6.2) timer.erl:595: :timer.tc/2
         (ex_unit 1.18.0) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4


     code: {:ok, pets} = TestClient.Api.Pets.pets_list_by_store(conn, "store-1")
     stacktrace:
       (tesla 1.13.2) lib/tesla/mock.ex:272: Tesla.Mock.rescue_call/2
       (tesla 1.13.2) lib/tesla/mock.ex:209: Tesla.Mock.call/2
       (tesla 1.13.2) lib/tesla/middleware/compression.ex:156: Tesla.Middleware.DecompressResponse.call/3
       (google_gax 0.4.1) test/test_client/api/pets.ex:35: TestClient.Api.Pets.pets_list_by_store/3
       test/gax/api_test.exs:44: (test)



  2) test request with compressed response (Gax.ApiTest)
     test/gax/api_test.exs:56
     ** (Tesla.Mock.Error) Request not mocked

     The following request was not mocked:

     %Tesla.Env{
       method: :get,
       url: "https://example.com/v1/stores/store-1/pets",
       query: [],
       headers: [
         {"x-goog-api-client", "gl-elixir/1.18.0 gax/0.4.1 gdcl/1.2.3"},
         {"accept-encoding", "gzip, deflate, identity"}
       ],
       body: nil,
       status: nil,
       opts: [],
       __module__: TestClient.Connection,
       __client__: %Tesla.Client{
         fun: nil,
         pre: [],
         post: [],
         adapter: {Tesla.Mock, :call, [[]]}
       }
     }

     ** (FunctionClauseError) no function clause matching in anonymous fn/1 in Gax.ApiTest."test request with compressed response"/1
         test/gax/api_test.exs:61: anonymous fn(%Tesla.Env{method: :get, url: "https://example.com/v1/stores/store-1/pets", query: [], headers: [{"x-goog-api-client", "gl-elixir/1.18.0 gax/0.4.1 gdcl/1.2.3"}, {"accept-encoding", "gzip, deflate, identity"}], body: nil, status: nil, opts: [], __module__: TestClient.Connection, __client__: %Tesla.Client{fun: nil, pre: [], post: [], adapter: {Tesla.Mock, :call, [[]]}}}) in Gax.ApiTest."test request with compressed response"/1
         (tesla 1.13.2) lib/tesla/mock.ex:269: Tesla.Mock.rescue_call/2
         (tesla 1.13.2) lib/tesla/mock.ex:209: Tesla.Mock.call/2
         (tesla 1.13.2) lib/tesla/middleware/compression.ex:156: Tesla.Middleware.DecompressResponse.call/3
         (google_gax 0.4.1) test/test_client/api/pets.ex:35: TestClient.Api.Pets.pets_list_by_store/3
         test/gax/api_test.exs:71: Gax.ApiTest."test request with compressed response"/1
         (ex_unit 1.18.0) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2
         (stdlib 6.2) timer.erl:595: :timer.tc/2
         (ex_unit 1.18.0) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4


     code: {:ok, pets} = TestClient.Api.Pets.pets_list_by_store(conn, "store-1")
     stacktrace:
       (tesla 1.13.2) lib/tesla/mock.ex:272: Tesla.Mock.rescue_call/2
       (tesla 1.13.2) lib/tesla/mock.ex:209: Tesla.Mock.call/2
       (tesla 1.13.2) lib/tesla/middleware/compression.ex:156: Tesla.Middleware.DecompressResponse.call/3
       (google_gax 0.4.1) test/test_client/api/pets.ex:35: TestClient.Api.Pets.pets_list_by_store/3
       test/gax/api_test.exs:71: (test)

..............................................
Finished in 0.2 seconds (0.2s async, 0.03s sync)
1 doctest, 48 tests, 2 failures, 1 skipped
@peaceful-james peaceful-james added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

1 participant