From 7b51923cae34f112f568b0fed363a755e18b3f02 Mon Sep 17 00:00:00 2001
From: Pavel Vostretsov
Date: Wed, 1 Dec 2021 11:35:59 +0500
Subject: [PATCH] fix build
---
.../Tests/TimeBasedColumnFamilyTest.cs | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Cassandra.ThriftClient.Tests/FunctionalTests/Tests/TimeBasedColumnFamilyTest.cs b/Cassandra.ThriftClient.Tests/FunctionalTests/Tests/TimeBasedColumnFamilyTest.cs
index 393f3a2..14f1f8f 100644
--- a/Cassandra.ThriftClient.Tests/FunctionalTests/Tests/TimeBasedColumnFamilyTest.cs
+++ b/Cassandra.ThriftClient.Tests/FunctionalTests/Tests/TimeBasedColumnFamilyTest.cs
@@ -115,34 +115,34 @@ private static TimeGuid[] GetTimeGuidNames(IEnumerable rawColumns)
private static TimeBasedColumn[] RandomColumnsByTimestamp(int count)
{
var now = Timestamp.Now;
- return Enumerable.Range(0, int.MaxValue).Select(x => new TimeBasedColumn
+ return MoreEnumerable.DistinctBy(Enumerable.Range(0, int.MaxValue).Select(x => new TimeBasedColumn
{
Timestamp = now.Ticks,
Name = new TimeGuid(TimeGuidBitsLayout.Format(now + ThreadLocalRandom.Instance.NextTimeSpan(TimeSpan.FromDays(1)), 0, new byte[6])),
Value = new byte[0],
- }).DistinctBy(x => x.Name).Take(count).ToArray();
+ }), x => x.Name).Take(count).ToArray();
}
private static TimeBasedColumn[] RandomColumnsByClockSequence(int count)
{
var now = Timestamp.Now;
- return Enumerable.Range(0, int.MaxValue).Select(x => new TimeBasedColumn
+ return MoreEnumerable.DistinctBy(Enumerable.Range(0, int.MaxValue).Select(x => new TimeBasedColumn
{
Timestamp = now.Ticks,
Name = new TimeGuid(TimeGuidBitsLayout.Format(now, ThreadLocalRandom.Instance.NextUshort(TimeGuidBitsLayout.MinClockSequence, TimeGuidBitsLayout.MaxClockSequence + 1), new byte[6])),
Value = new byte[0],
- }).DistinctBy(x => x.Name).Take(count).ToArray();
+ }), x => x.Name).Take(count).ToArray();
}
private static TimeBasedColumn[] RandomColumnsByNode(int count)
{
var now = Timestamp.Now;
- return Enumerable.Range(0, int.MaxValue).Select(x => new TimeBasedColumn
+ return MoreEnumerable.DistinctBy(Enumerable.Range(0, int.MaxValue).Select(x => new TimeBasedColumn
{
Timestamp = now.Ticks,
Name = new TimeGuid(TimeGuidBitsLayout.Format(now, 0, ThreadLocalRandom.Instance.NextBytes(6))),
Value = new byte[0],
- }).DistinctBy(x => x.Name).Take(count).ToArray();
+ }), x => x.Name).Take(count).ToArray();
}
private IColumnFamilyConnectionImplementation cfConnection;