Giter Club home page Giter Club logo

Comments (4)

wllenyj avatar wllenyj commented on August 15, 2024

thread 'server::tests::test_wait_in_flight_responses' panicked at 'called Result::unwrap() on an Err value: Underflow', src/server.rs:1134:14

I see src/server.rs:1134 is in another test case, is it based on the master branch? Or can you remember the exact unwrap line?

from dbs-uhttp.

wllenyj avatar wllenyj commented on August 15, 2024

I've added the call stack to fail in #20 , to be reproduced.

from dbs-uhttp.

changweige avatar changweige commented on August 15, 2024

thread 'server::tests::test_wait_in_flight_responses' panicked at 'called Result::unwrap() on an Err value: Underflow', src/server.rs:1134:14

I see src/server.rs:1134 is in another test case, is it based on the master branch? Or can you remember the exact unwrap line?

I suppose it's because the test result is printed with my patch applied which adds code lines to server.rs #18

from dbs-uhttp.

changweige avatar changweige commented on August 15, 2024

I re-ran the test on the latest main branch. Please check out the error message

running 13 tests
test src/common/headers.rs - common::headers::MediaType::as_str (line 414) ... ok
test src/common/mod.rs - common::Version (line 293) ... ok
test src/common/headers.rs - common::headers::MediaType::try_from (line 391) ... ok
test src/lib.rs - (line 47) ... ok
test src/common/headers.rs - common::headers::Encoding::try_from (line 325) ... ok
test src/common/headers.rs - common::headers::Headers::parse_header_line (line 130) ... ok
test src/common/mod.rs - common::Body (line 194) ... ok
test src/common/headers.rs - common::headers::Headers::try_from (line 263) ... ok
test src/request.rs - request::Request::try_from (line 184) ... ok
test src/lib.rs - (line 57) ... ok
test src/lib.rs - (line 83) ... ok
test src/router.rs - router::HttpRoutes<T>::handle_http_request (line 64) ... ok
test src/server.rs - server::HttpServer (line 251) ... FAILED

failures:

---- src/server.rs - server::HttpServer (line 251) stdout ----
Test executable failed (exit status: 101).

stderr:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: IOError(Os { code: 98, kind: AddrInUse, message: "Address already in use" })', src/server.rs:10:50
stack backtrace:
   0:     0x5565989f5a0d - std::backtrace_rs::backtrace::libunwind::trace::h8217d0a8f3fd2f41
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x5565989f5a0d - std::backtrace_rs::backtrace::trace_unsynchronized::h308103876b3af410
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x5565989f5a0d - std::sys_common::backtrace::_print_fmt::hc208018c6153605e
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x5565989f5a0d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf89a7ed694dfb585
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x556598a106ac - core::fmt::write::h21038c1382fe4264
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/fmt/mod.rs:1197:17
   5:     0x5565989f38f1 - std::io::Write::write_fmt::h7dbb1c9a3c254aef
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/io/mod.rs:1672:15
   6:     0x5565989f7095 - std::sys_common::backtrace::_print::h4e8889719c9ddeb8
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x5565989f7095 - std::sys_common::backtrace::print::h1506fe2cb3022667
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x5565989f7095 - std::panicking::default_hook::{{closure}}::hd9d7ce2a8a782440
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:295:22
   9:     0x5565989f6db6 - std::panicking::default_hook::h5b16ec25444b1b5d
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:314:9
  10:     0x5565989f7626 - std::panicking::rust_panic_with_hook::hb0138cb6e6fea3e4
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:698:17
  11:     0x5565989f7517 - std::panicking::begin_panic_handler::{{closure}}::h4cb67095557cd1aa
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:588:13
  12:     0x5565989f5ec4 - std::sys_common::backtrace::__rust_end_short_backtrace::h2bfcac279dcdc911
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:138:18
  13:     0x5565989f7249 - rust_begin_unwind
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:584:5
  14:     0x556598998603 - core::panicking::panic_fmt::h1de71520faaa17d3
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:142:14
  15:     0x556598998693 - core::result::unwrap_failed::hc0baa33ef8bc7db8
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/result.rs:1805:5
  16:     0x556598999d04 - core::result::Result<T,E>::unwrap::h592a15e67aa6a779
  17:     0x55659899a953 - rust_out::main::_doctest_main_src_server_rs_251_0::h42eeaf24c076b129
  18:     0x55659899a8f6 - rust_out::main::heaf1d1c6cf89ad96
  19:     0x556598999953 - core::ops::function::FnOnce::call_once::h5b21711befc31851
  20:     0x556598998cb9 - std::sys_common::backtrace::__rust_begin_short_backtrace::h5f233326b8786c0e
  21:     0x556598999629 - std::rt::lang_start::{{closure}}::h52b0c5001fae4f75
  22:     0x5565989f14fe - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h4937aaa125c8d4b2
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/ops/function.rs:280:13
  23:     0x5565989f14fe - std::panicking::try::do_call::h6f5c70e8b0a34f92
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:492:40
  24:     0x5565989f14fe - std::panicking::try::h68766ba264ecf2e2
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:456:19
  25:     0x5565989f14fe - std::panic::catch_unwind::hc36033d2f9cc04af
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panic.rs:137:14
  26:     0x5565989f14fe - std::rt::lang_start_internal::{{closure}}::h78c037f4a1a28ded
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/rt.rs:128:48
  27:     0x5565989f14fe - std::panicking::try::do_call::he6e1fffda4c750ee
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:492:40
  28:     0x5565989f14fe - std::panicking::try::h48a77ddbb2f4c87a
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:456:19
  29:     0x5565989f14fe - std::panic::catch_unwind::hfa809b06a550a9e7
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panic.rs:137:14
  30:     0x5565989f14fe - std::rt::lang_start_internal::h4db69ed48eaca005
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/rt.rs:128:20
  31:     0x556598999611 - std::rt::lang_start::h20dea3d2ecba93b4
  32:     0x55659899acf3 - main
  33:     0x7f66f516b09b - __libc_start_main
                               at /build/glibc-fWwxX8/glibc-2.28/csu/../csu/libc-start.c:308:16
  34:     0x55659899889a - _start
  35:                0x0 - <unknown>



failures:
    src/server.rs - server::HttpServer (line 251)

test result: FAILED. 12 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.80s

error: test failed, to rerun pass '--doc'

from dbs-uhttp.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.