File tree Expand file tree Collapse file tree 2 files changed +14
-9
lines changed
tests/Valkey.Glide.IntegrationTests Expand file tree Collapse file tree 2 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -482,12 +482,14 @@ pub unsafe extern "C-unwind" fn request_cluster_scan(
482482 Ok ( existing_cursor) => existing_cursor,
483483 Err ( _error) => {
484484 unsafe {
485- ( core. failure_callback ) (
485+ report_error (
486+ core. failure_callback ,
486487 callback_index,
487- format ! ( "Invalid cursor ID: {}" , cursor_id) . as_ptr ( ) as * const c_char ,
488+ format ! ( "Invalid cursor ID: {}" , cursor_id) ,
488489 RequestErrorType :: Unspecified ,
489490 ) ;
490491 }
492+ panic_guard. panicked = false ;
491493 return ;
492494 }
493495 }
@@ -504,7 +506,10 @@ pub unsafe extern "C-unwind" fn request_cluster_scan(
504506 )
505507 } {
506508 Some ( args) => args,
507- None => return ,
509+ None => {
510+ panic_guard. panicked = false ;
511+ return ;
512+ }
508513 } ;
509514
510515 // Run cluster scan.
Original file line number Diff line number Diff line change @@ -104,16 +104,16 @@ public async Task TestScanAsync_CombinedOptions(BaseClient client)
104104 [ Fact ]
105105 public async Task TestScanAsync_InvalidCursorId ( )
106106 {
107- var standaloneClient = TestConfiguration . DefaultStandaloneClient ( ) ;
108- var exception = await Assert . ThrowsAsync < Valkey . Glide . Errors . RequestException > ( async ( ) =>
107+ using var standaloneClient = TestConfiguration . DefaultStandaloneClient ( ) ;
108+ await Assert . ThrowsAsync < Valkey . Glide . Errors . RequestException > ( ( ) =>
109109 {
110- await standaloneClient . ScanAsync ( "invalid" ) ;
110+ return standaloneClient . ScanAsync ( "invalid" ) ;
111111 } ) ;
112112
113- var clusterClient = TestConfiguration . DefaultClusterClient ( ) ;
114- exception = await Assert . ThrowsAsync < Valkey . Glide . Errors . RequestException > ( async ( ) =>
113+ using var clusterClient = TestConfiguration . DefaultClusterClient ( ) ;
114+ await Assert . ThrowsAsync < Valkey . Glide . Errors . RequestException > ( ( ) =>
115115 {
116- await clusterClient . ScanAsync ( new ClusterScanCursor ( "invalid" ) ) ;
116+ return clusterClient . ScanAsync ( new ClusterScanCursor ( "invalid" ) ) ;
117117 } ) ;
118118 }
119119
You can’t perform that action at this time.
0 commit comments