Public Access
This commit is contained in:
@@ -843,6 +843,7 @@ public sealed class RecordingCoordinatorTests
|
||||
};
|
||||
var audioSource = new ControlledAudioSource();
|
||||
var summaryPipeline = new CapturingMeetingSummaryPipeline();
|
||||
var metadataProvider = new BlockingMeetingMetadataProvider(new MeetingMetadata("", [], ""));
|
||||
var coordinator = new MeetingRecordingCoordinator(
|
||||
audioSource,
|
||||
new TestSpeechRecognitionPipelineFactory(new EchoStreamingTranscriptionProvider()),
|
||||
@@ -853,37 +854,44 @@ public sealed class RecordingCoordinatorTests
|
||||
new InMemoryRecordedAudioStore(),
|
||||
summaryPipeline,
|
||||
Options.Create(options),
|
||||
NullLogger<MeetingRecordingCoordinator>.Instance);
|
||||
NullLogger<MeetingRecordingCoordinator>.Instance,
|
||||
meetingMetadataProvider: metadataProvider);
|
||||
|
||||
var started = await coordinator.StartAsync(CancellationToken.None);
|
||||
await audioSource.WriteAsync(new AudioChunk([1, 0], 16000, 1), CancellationToken.None);
|
||||
await WaitUntilAsync(() =>
|
||||
FileContainsText(started.AssistantContextPath!, "state: transcribing"));
|
||||
var attachmentPath = Path.Combine(
|
||||
Path.GetDirectoryName(started.AssistantContextPath!)!,
|
||||
"Attachments",
|
||||
"20260527-093135-123-000010-cropped.png");
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(attachmentPath)!);
|
||||
await File.WriteAllTextAsync(attachmentPath, "image");
|
||||
await AppendTextWithRetryAsync(
|
||||
started.AssistantContextPath!,
|
||||
Environment.NewLine + "" + Environment.NewLine);
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(started.SummaryPath!)!);
|
||||
await File.WriteAllTextAsync(started.SummaryPath!, "draft summary");
|
||||
try
|
||||
{
|
||||
var started = await coordinator.StartAsync(CancellationToken.None);
|
||||
await audioSource.WriteAsync(new AudioChunk([1, 0], 16000, 1), CancellationToken.None);
|
||||
await WaitUntilAsync(() => File.Exists(started.AssistantContextPath!));
|
||||
var attachmentPath = Path.Combine(
|
||||
Path.GetDirectoryName(started.AssistantContextPath!)!,
|
||||
"Attachments",
|
||||
"20260527-093135-123-000010-cropped.png");
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(attachmentPath)!);
|
||||
await File.WriteAllTextAsync(attachmentPath, "image");
|
||||
await AppendTextWithRetryAsync(
|
||||
started.AssistantContextPath!,
|
||||
Environment.NewLine + "" + Environment.NewLine);
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(started.SummaryPath!)!);
|
||||
await File.WriteAllTextAsync(started.SummaryPath!, "draft summary");
|
||||
|
||||
var aborted = await coordinator.AbortAsync(CancellationToken.None);
|
||||
var aborted = await coordinator.AbortAsync(CancellationToken.None);
|
||||
|
||||
Assert.False(aborted.IsRecording);
|
||||
Assert.Null(aborted.MeetingNotePath);
|
||||
Assert.False(File.Exists(started.MeetingNotePath));
|
||||
Assert.False(File.Exists(started.TranscriptPath));
|
||||
Assert.False(File.Exists(started.AssistantContextPath));
|
||||
Assert.False(File.Exists(started.SummaryPath));
|
||||
Assert.False(File.Exists(attachmentPath));
|
||||
Assert.Null(summaryPipeline.Artifacts);
|
||||
Assert.False(aborted.IsRecording);
|
||||
Assert.Null(aborted.MeetingNotePath);
|
||||
Assert.False(File.Exists(started.MeetingNotePath));
|
||||
Assert.False(File.Exists(started.TranscriptPath));
|
||||
Assert.False(File.Exists(started.AssistantContextPath));
|
||||
Assert.False(File.Exists(started.SummaryPath));
|
||||
Assert.False(File.Exists(attachmentPath));
|
||||
Assert.Null(summaryPipeline.Artifacts);
|
||||
|
||||
await Task.Delay(250);
|
||||
Assert.False(File.Exists(started.AssistantContextPath));
|
||||
await Task.Delay(250);
|
||||
Assert.False(File.Exists(started.AssistantContextPath));
|
||||
}
|
||||
finally
|
||||
{
|
||||
metadataProvider.Release();
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in New Issue
Block a user