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