Skip to content

Commit 524dd32

Browse files
Improve repository analyse assertions (#5891) (#5897)
Co-authored-by: Steve Gordon <[email protected]>
1 parent e366a81 commit 524dd32

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

tests/Tests/Modules/SnapshotAndRestore/Repositories/CoordinatedRepositoryTests.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,15 @@ public async Task AnalyzeRepositoryResponse() => await Assert<AnalyzeRepositoryR
194194
var reads = d.Reads.First();
195195
reads.NodeIdentity.Id.Should().NotBeNullOrEmpty();
196196
reads.NodeIdentity.Name.Should().NotBeNullOrEmpty();
197-
reads.FirstByteTime.Should().NotBeNullOrEmpty();
198-
reads.FirstByteTimeNanos.Should().BeGreaterThan(0);
199-
reads.Elapsed.Should().NotBeNullOrEmpty();
200-
reads.ElapsedNanos.Should().BeGreaterThan(0);
201-
reads.Throttled.Should().NotBeNullOrEmpty();
202-
reads.ThrottledNanos.Should().BeGreaterOrEqualTo(0);
197+
if (reads.Found)
198+
{
199+
reads.FirstByteTime.Should().NotBeNullOrEmpty();
200+
reads.FirstByteTimeNanos.Should().BeGreaterThan(0);
201+
reads.Elapsed.Should().NotBeNullOrEmpty();
202+
reads.ElapsedNanos.Should().BeGreaterThan(0);
203+
reads.Throttled.Should().NotBeNullOrEmpty();
204+
reads.ThrottledNanos.Should().BeGreaterOrEqualTo(0);
205+
}
203206
});
204207

205208
[I]

0 commit comments

Comments
 (0)