File tree Expand file tree Collapse file tree 4 files changed +42
-9
lines changed
test_cases/concurrent-redirect Expand file tree Collapse file tree 4 files changed +42
-9
lines changed Original file line number Diff line number Diff line change @@ -81,9 +81,9 @@ http = "0.2"
8181faster-hex = " 0.9.0"
8282tracing = " 0.1"
8383
84- # DEBUG
85- # [patch.crates-io]
86- # deno_core = { path = "/Users/andrespirela/Documents/workspace/ supabase/deno_core/core " }
84+ [ patch . crates-io ]
85+ # TODO(Nyannyacha): Patch below is temporary. Clean the line in the Deno 1.44 update.
86+ deno_core = { git = " https://github.com/ supabase/deno_core" , branch = " 278-supabase " }
8787
8888[profile .dind ]
8989inherits = " dev"
Original file line number Diff line number Diff line change 1+ // NOTE(Nyannyacha): This is the same test case as described in denoland/deno_core#762, but it is a
2+ // minimal reproducible sample of what happens in the field.
3+ //
4+ // `@1.x` suffixes cause forced redirects for specifiers.
5+
6+ import * as A from "https://lib.deno.dev/x/grammy@1.x/mod.ts" ;
7+ import * as B from "https://lib.deno.dev/x/grammy@1.x/types.ts" ;
8+
9+ console . log ( A , B ) ;
10+
11+ Deno . serve ( ( _req ) => new Response ( "meow" ) ) ;
Original file line number Diff line number Diff line change @@ -2074,6 +2074,31 @@ async fn test_request_idle_timeout_websocket_node_secure() {
20742074 test_request_idle_timeout_websocket_deno ( new_localhost_tls ( true ) , true ) . await ;
20752075}
20762076
2077+ #[ tokio:: test]
2078+ #[ serial]
2079+ async fn test_should_not_hang_when_forced_redirection_for_specifiers ( ) {
2080+ let ( tx, rx) = oneshot:: channel :: < ( ) > ( ) ;
2081+
2082+ integration_test ! (
2083+ "./test_cases/main" ,
2084+ NON_SECURE_PORT ,
2085+ "concurrent-redirect" ,
2086+ None ,
2087+ None ,
2088+ None ,
2089+ None ,
2090+ ( |resp| async {
2091+ assert_eq!( resp. unwrap( ) . status( ) . as_u16( ) , 200 ) ;
2092+ tx. send( ( ) ) . unwrap( ) ;
2093+ } ) ,
2094+ TerminationToken :: new( )
2095+ ) ;
2096+
2097+ if timeout ( Duration :: from_secs ( 10 ) , rx) . await . is_err ( ) {
2098+ panic ! ( "failed to check within 10 seconds" ) ;
2099+ }
2100+ }
2101+
20772102trait AsyncReadWrite : AsyncRead + AsyncWrite + Send + Unpin { }
20782103
20792104impl < T > AsyncReadWrite for T where T : AsyncRead + AsyncWrite + Send + Unpin { }
You can’t perform that action at this time.
0 commit comments