Skip to content

Commit d2b62f0

Browse files
🧪 [testing improvement] Cover unwrap panics in web module
Co-authored-by: Tcode-Motion <188012755+Tcode-Motion@users.noreply.github.com>
1 parent ffc86ed commit d2b62f0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎stdlib/tests/stdlib_tests.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,8 @@ fn test_web_module() {
429429
let stop = web.exports.get("stop").unwrap();
430430

431431
// Bind a listener to a random port to ensure the port is taken
432-
let listener = TcpListener::bind("127.0.0.1:0").unwrap();
432+
// Keep it alive to conflict
433+
let listener = TcpListener::bind("0.0.0.0:0").unwrap();
433434
let port = listener.local_addr().unwrap().port();
434435

435436
// Test panic on `start` when port is in use

0 commit comments

Comments
 (0)