fix tests. new product advisories enhancements
This commit is contained in:
@@ -44,8 +44,18 @@ public class ConcelierTimelineEndpointTests : IClassFixture<ConcelierApplication
|
||||
|
||||
var stream = await response.Content.ReadAsStreamAsync();
|
||||
using var reader = new StreamReader(stream);
|
||||
var firstLine = await reader.ReadLineAsync();
|
||||
firstLine.Should().NotBeNull();
|
||||
firstLine!.Should().StartWith("event: ingest.update");
|
||||
// The SSE stream may start with a retry directive; skip non-event lines.
|
||||
string? line;
|
||||
string? eventLine = null;
|
||||
while ((line = await reader.ReadLineAsync()) is not null)
|
||||
{
|
||||
if (line.StartsWith("event:", StringComparison.Ordinal))
|
||||
{
|
||||
eventLine = line;
|
||||
break;
|
||||
}
|
||||
}
|
||||
eventLine.Should().NotBeNull();
|
||||
eventLine!.Should().StartWith("event: ingest.update");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user