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

(UndefinedFunctionError) function :http_util.timestamp/0 is undefined (module :http_util is not available) #63

Closed
kianmeng opened this issue Jul 6, 2023 · 2 comments · Fixed by #64

Comments

@kianmeng
Copy link
Contributor

kianmeng commented Jul 6, 2023

env:

$ asdf current
elixir          1.15.1-otp-25   /tmp/x509/.tool-versions
erlang          25.3.2.3        /tmp/x509/.tool-versions
...

test output:

$ mix test --include openssl                                           
warning: Logger.warn/1 is deprecated. Use Logger.warning/2 instead                                                   
  lib/x509/test/crl_server.ex:110                                                                                    
                                                                                                                     
warning: Logger.warn/1 is deprecated. Use Logger.warning/2 instead                                                   
  lib/x509/test/suite.ex:585                                                                                         
                                                                                                                     
Excluding tags: [:known_to_fail]                                                                                     
Including tags: [:openssl]                                                                                           
                                                                                                                     
warning: Logger.warn/1 is deprecated. Use Logger.warning/2 instead
  test/x509/test/server_test.exs:842: X509.Test.ServerTest (module)

warning: System.get_pid/0 is deprecated. Use System.pid/0 instead
  test/x509/test/server_test.exs:899: X509.Test.ServerTest.create_pem_files/1



  1) test ECDSA, PEM client-cert (X509.Test.ServerTest)
     test/x509/test/server_test.exs:618
     ** (UndefinedFunctionError) function :http_util.timestamp/0 is undefined (module :http_util is not available)
     code: request('https://client-cert.#{context.suite.domain}:#{context.port}/',
     stacktrace:
       (inets 8.3.1) :http_util.timestamp()
       (inets 8.3.1) httpc.erl:749: :httpc.handle_request/9
       test/x509/test/server_test.exs:79: X509.Test.ServerTest.request/2
       test/x509/test/server_test.exs:620: (test)
...
@voltone
Copy link
Owner

voltone commented Jul 6, 2023

Thanks for the report! This is related to the code load path changes in Elixir 1.15. It can be fixed by adding :inets to the :extra_applications, but we only really want that when Mix.env() == :test.

I will make a PR to add OTP 26 and Elixir 1.15 testing to CI, and then fix the issue there as well.

@kianmeng
Copy link
Contributor Author

kianmeng commented Jul 6, 2023

🥳 🥳 🥳 🥳 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants