@@ -171,7 +171,7 @@ impl Guest for Component {
171171 Ok ( result) => {
172172 trace ! ( "Recived result: {:?}" , result. metadata) ;
173173 let dir = "/test-audio-files" ;
174- let name = "test4 -without-options.mp3" ;
174+ let name = "test3 -without-options.mp3" ;
175175 let storage_msg = save_audio ( & result. audio_data , dir, name) ;
176176 push_result ( & mut test_result, result, test_name, format ! ( "{dir}/{name}" ) ) ;
177177 test_result. push_str ( & format ! ( "\n {}\n " , storage_msg) ) ;
@@ -232,7 +232,7 @@ impl Guest for Component {
232232 Ok ( result) => {
233233 trace ! ( "Recived result: {:?}" , result. metadata) ;
234234 let dir = "/test-audio-files" ;
235- let name = "test5 -ssml.mp3" ;
235+ let name = "test4 -ssml.mp3" ;
236236 let storage_msg = save_audio ( & result. audio_data , dir, name) ;
237237 push_result ( & mut test_result, result, test_name, format ! ( "{dir}/{name}" ) ) ;
238238 test_result. push_str ( & format ! ( "\n {}\n " , storage_msg) ) ;
@@ -303,7 +303,7 @@ impl Guest for Component {
303303 for result in batch {
304304 trace ! ( "#{index} Recived result: {:?} " , result. metadata) ;
305305 let dir = "/test-audio-files" ;
306- let name = format ! ( "test6 -batch-{}.mp3" , index) ;
306+ let name = format ! ( "test5 -batch-{}.mp3" , index) ;
307307 let storage_msg = save_audio ( & result. audio_data , dir, & name) ;
308308 test_result. push_str ( & format ! ( "Batch Item #{index}: " ) ) ;
309309 push_result ( & mut test_result, result, test_name, format ! ( "{dir}/{name}" ) ) ;
@@ -498,7 +498,7 @@ impl Guest for Component {
498498 ) ) ;
499499
500500 let dir = "/test-audio-files" ;
501- let name = "test10 -voice-conversion.mp3" ;
501+ let name = "test7 -voice-conversion.mp3" ;
502502 let storage_msg = save_audio ( & converted_audio, dir, name) ;
503503 test_result. push_str ( & format ! ( "💾 Audio saved at {dir}/{name} " ) ) ;
504504 test_result. push_str ( & format ! ( "\n {}\n " , storage_msg) ) ;
@@ -528,7 +528,7 @@ impl Guest for Component {
528528 ) ) ;
529529
530530 let dir = "/test-audio-files" ;
531- let name = "test10 -sound-effect.mp3" ;
531+ let name = "test7 -sound-effect.mp3" ;
532532 let storage_msg = save_audio ( & sound_effect, dir, name) ;
533533 test_result. push_str ( & format ! ( "💾 Audio saved at {dir}/{name}\n " ) ) ;
534534 test_result. push_str ( & format ! ( "{}\n " , storage_msg) ) ;
@@ -560,37 +560,21 @@ impl Guest for Component {
560560
561561 let long_content = format ! ( "{}\n \n {}\n \n {}" , TEXT , TEXT , TEXT ) ;
562562
563- // For AWS Polly, output_location must be an S3 location (s3://bucket/key)
564- // For other providers, it can be a local path
565- #[ cfg( feature = "polly" ) ]
566- let output_location = {
567- match std:: env:: var ( "AWS_S3_BUCKET" ) {
568- Ok ( bucket) => format ! ( "s3://{}/test-audio-files/test11-long-form" , bucket) ,
569- Err ( _) => {
570- test_result. push_str ( & format ! ( "{test_name} ❌\n " ) ) ;
571- test_result. push_str ( "ERROR : Missing required environment variable AWS_S3_BUCKET for AWS Polly long-form synthesis\n " ) ;
572- return test_result;
573- }
574- }
575- } ;
576-
577- #[ cfg( not( feature = "polly" ) ) ]
578- let output_location = "/test-audio-files/test11-long-form.mp3" ;
579-
580563 let chapter_breaks = [ 0 , TEXT . len ( ) as u32 , ( TEXT . len ( ) * 2 ) as u32 ] ;
581564
582- match synthesize_long_form (
583- & long_content,
584- & voice,
585- & output_location,
586- Some ( & chapter_breaks) ,
587- ) {
565+ match synthesize_long_form ( & long_content, & voice, Some ( & chapter_breaks) ) {
588566 Ok ( operation) => {
589567 // Monitor the operation progress
590568 let mut attempts = 0 ;
591569 let max_attempts = 30 ;
592570
593571 while attempts < max_attempts {
572+ if attempts == 3 {
573+ // Simulate crash
574+ let agent_name = std:: env:: var ( "GOLEM_WORKER_NAME" ) . unwrap ( ) ;
575+ mimic_crash ( & agent_name) ;
576+ }
577+
594578 let status = operation. get_status ( ) ;
595579 let progress: f32 = operation. get_progress ( ) ;
596580 trace ! (
@@ -740,13 +724,6 @@ impl Guest for Component {
740724
741725 // Test pronunciation lexicons
742726 fn test9 ( ) -> String {
743- let voice = match get_voice ( VOICE_UUID ) {
744- Ok ( voices) => voices,
745- Err ( err) => {
746- return format ! ( "❌ ERROR : {:?}" , err) ;
747- }
748- } ;
749-
750727 let mut test_result = String :: new ( ) ;
751728 test_result. push_str ( "Test pronunciation lexicons summary:\n " ) ;
752729
@@ -805,6 +782,10 @@ impl Guest for Component {
805782 trace ! ( "Exporting lexicon content..." ) ;
806783 let test3_name = "3. Test export lexicon" ;
807784
785+ // Simulate crash
786+ let agent_name = std:: env:: var ( "GOLEM_WORKER_NAME" ) . unwrap ( ) ;
787+ mimic_crash ( & agent_name) ;
788+
808789 match lexicon. export_content ( ) {
809790 Ok ( content) => {
810791 trace ! (
0 commit comments