@@ -27,7 +27,6 @@ mod tests {
2727 use dynamo_llm:: protocols:: openai:: chat_completions:: {
2828 NvCreateChatCompletionRequest , NvCreateChatCompletionResponse ,
2929 } ;
30- use dynamo_runtime:: Runtime ;
3130 use dynamo_runtime:: transports:: nats;
3231 use futures:: StreamExt ;
3332 use serde_json:: Value ;
@@ -48,15 +47,6 @@ mod tests {
4847 . expect ( "Failed to connect to NATS server" )
4948 }
5049
51- /// Helper to create a test DistributedRuntime with NATS
52- async fn create_test_drt ( ) -> dynamo_runtime:: DistributedRuntime {
53- let rt = Runtime :: from_current ( ) . unwrap ( ) ;
54- let config = dynamo_runtime:: distributed:: DistributedConfig :: from_settings ( ) ;
55- dynamo_runtime:: DistributedRuntime :: new ( rt, config)
56- . await
57- . expect ( "Failed to create DistributedRuntime" )
58- }
59-
6050 /// Helper to create a minimal test request
6151 fn create_test_request ( model : & str , store : bool ) -> NvCreateChatCompletionRequest {
6252 let json = serde_json:: json!( {
@@ -155,7 +145,6 @@ mod tests {
155145 // Core test: audit records are published to NATS with correct structure
156146 async_with_vars (
157147 [
158- ( "DYN_AUDIT_ENABLED" , Some ( "1" ) ) ,
159148 ( "DYN_AUDIT_SINKS" , Some ( "nats" ) ) ,
160149 ( "DYN_AUDIT_NATS_SUBJECT" , Some ( TEST_SUBJECT ) ) ,
161150 ] ,
@@ -166,8 +155,7 @@ mod tests {
166155 setup_test_stream ( & client, & stream_name, TEST_SUBJECT ) . await ;
167156
168157 bus:: init ( 100 ) ;
169- let drt = create_test_drt ( ) . await ;
170- sink:: spawn_workers_from_env ( & drt) ;
158+ sink:: spawn_workers_from_env ( ) . await . unwrap ( ) ;
171159 time:: sleep ( Duration :: from_millis ( 100 ) ) . await ;
172160
173161 // Emit audit record
@@ -212,7 +200,6 @@ mod tests {
212200
213201 async_with_vars (
214202 [
215- ( "DYN_AUDIT_ENABLED" , Some ( "1" ) ) ,
216203 ( "DYN_AUDIT_SINKS" , Some ( "nats" ) ) ,
217204 ( "DYN_AUDIT_NATS_SUBJECT" , Some ( TEST_SUBJECT ) ) ,
218205 ] ,
@@ -223,8 +210,7 @@ mod tests {
223210 setup_test_stream ( & client, & stream_name, TEST_SUBJECT ) . await ;
224211
225212 bus:: init ( 100 ) ;
226- let drt = create_test_drt ( ) . await ;
227- sink:: spawn_workers_from_env ( & drt) ;
213+ sink:: spawn_workers_from_env ( ) . await . unwrap ( ) ;
228214 time:: sleep ( Duration :: from_millis ( 100 ) ) . await ;
229215
230216 // Request with store=true (should be audited)
0 commit comments