You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sa...@apache.org on 2021/01/22 11:42:14 UTC

[cassandra] branch trunk updated: Ninja: fix fqltool tests (CASSANDRA-16384 follow up)

This is an automated email from the ASF dual-hosted git repository.

samt pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 07167c9  Ninja: fix fqltool tests (CASSANDRA-16384 follow up)
07167c9 is described below

commit 07167c95e3fc6616c313877ccd20eecbb42ef4c0
Author: Sam Tunnicliffe <sa...@beobal.com>
AuthorDate: Fri Jan 22 11:41:42 2021 +0000

    Ninja: fix fqltool tests (CASSANDRA-16384 follow up)
---
 .../apache/cassandra/fqltool/FQLCompareTest.java   |  4 ++--
 .../apache/cassandra/fqltool/FQLReplayTest.java    | 22 +++++++++++-----------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/tools/fqltool/test/unit/org/apache/cassandra/fqltool/FQLCompareTest.java b/tools/fqltool/test/unit/org/apache/cassandra/fqltool/FQLCompareTest.java
index 7990b7e..ef296e2 100644
--- a/tools/fqltool/test/unit/org/apache/cassandra/fqltool/FQLCompareTest.java
+++ b/tools/fqltool/test/unit/org/apache/cassandra/fqltool/FQLCompareTest.java
@@ -33,7 +33,7 @@ import org.junit.Test;
 
 import net.openhft.chronicle.core.io.Closeable;
 import net.openhft.chronicle.queue.ChronicleQueue;
-import net.openhft.chronicle.queue.ChronicleQueueBuilder;
+import net.openhft.chronicle.queue.impl.single.SingleChronicleQueueBuilder;
 import org.apache.cassandra.cql3.QueryOptions;
 import org.apache.cassandra.fqltool.commands.Compare;
 import org.apache.cassandra.tools.Util;
@@ -80,7 +80,7 @@ public class FQLCompareTest
         List<ChronicleQueue> readQueues = null;
         try
         {
-            readQueues = resultPaths.stream().map(s -> ChronicleQueueBuilder.single(s).readOnly(true).build()).collect(Collectors.toList());
+            readQueues = resultPaths.stream().map(s -> SingleChronicleQueueBuilder.single(s).readOnly(true).build()).collect(Collectors.toList());
             List<Iterator<ResultHandler.ComparableResultSet>> its = readQueues.stream().map(q -> new Compare.StoredResultSetIterator(q.createTailer())).collect(Collectors.toList());
             List<ResultHandler.ComparableResultSet> resultSets = Compare.resultSets(its);
             while(resultSets.stream().allMatch(Objects::nonNull))
diff --git a/tools/fqltool/test/unit/org/apache/cassandra/fqltool/FQLReplayTest.java b/tools/fqltool/test/unit/org/apache/cassandra/fqltool/FQLReplayTest.java
index 7fb39af..894bfc4 100644
--- a/tools/fqltool/test/unit/org/apache/cassandra/fqltool/FQLReplayTest.java
+++ b/tools/fqltool/test/unit/org/apache/cassandra/fqltool/FQLReplayTest.java
@@ -38,7 +38,7 @@ import com.datastax.driver.core.SimpleStatement;
 import com.datastax.driver.core.Statement;
 import net.openhft.chronicle.core.io.IORuntimeException;
 import net.openhft.chronicle.queue.ChronicleQueue;
-import net.openhft.chronicle.queue.ChronicleQueueBuilder;
+import net.openhft.chronicle.queue.impl.single.SingleChronicleQueueBuilder;
 import net.openhft.chronicle.queue.ExcerptAppender;
 import net.openhft.chronicle.queue.ExcerptTailer;
 import net.openhft.chronicle.wire.WireOut;
@@ -75,7 +75,7 @@ public class FQLReplayTest
     {
         File f = generateQueries(100, true);
         int queryCount = 0;
-        try (ChronicleQueue queue = ChronicleQueueBuilder.single(f).build();
+        try (ChronicleQueue queue = SingleChronicleQueueBuilder.single(f).build();
              FQLQueryIterator iter = new FQLQueryIterator(queue.createTailer(), 101))
         {
             long last = -1;
@@ -95,7 +95,7 @@ public class FQLReplayTest
     {
         File f = generateQueries(100, false);
         int queryCount = 0;
-        try (ChronicleQueue queue = ChronicleQueueBuilder.single(f).build();
+        try (ChronicleQueue queue = SingleChronicleQueueBuilder.single(f).build();
              FQLQueryIterator iter = new FQLQueryIterator(queue.createTailer(), 1))
         {
             long last = -1;
@@ -116,8 +116,8 @@ public class FQLReplayTest
         File f = generateQueries(100, false);
         File f2 = generateQueries(100, false);
         int queryCount = 0;
-        try (ChronicleQueue queue = ChronicleQueueBuilder.single(f).build();
-             ChronicleQueue queue2 = ChronicleQueueBuilder.single(f2).build();
+        try (ChronicleQueue queue = SingleChronicleQueueBuilder.single(f).build();
+             ChronicleQueue queue2 = SingleChronicleQueueBuilder.single(f2).build();
              FQLQueryIterator iter = new FQLQueryIterator(queue.createTailer(), 101);
              FQLQueryIterator iter2 = new FQLQueryIterator(queue2.createTailer(), 101);
              MergeIterator<FQLQuery, List<FQLQuery>> merger = MergeIterator.get(Lists.newArrayList(iter, iter2), FQLQuery::compareTo, new Replay.Reducer()))
@@ -142,7 +142,7 @@ public class FQLReplayTest
     {
         FQLQueryReader reader = new FQLQueryReader();
 
-        try (ChronicleQueue queue = ChronicleQueueBuilder.single(generateQueries(1000, true)).build())
+        try (ChronicleQueue queue = SingleChronicleQueueBuilder.single(generateQueries(1000, true)).build())
         {
             ExcerptTailer tailer = queue.createTailer();
             int queryCount = 0;
@@ -594,7 +594,7 @@ public class FQLReplayTest
     {
         FQLQueryReader reader = new FQLQueryReader();
         File dir = Files.createTempDirectory("chronicle").toFile();
-        try (ChronicleQueue queue = ChronicleQueueBuilder.single(dir).build())
+        try (ChronicleQueue queue = SingleChronicleQueueBuilder.single(dir).build())
         {
             ExcerptAppender appender = queue.acquireAppender();
             appender.writeDocument(new BinLog.ReleaseableWriteMarshallable() {
@@ -635,7 +635,7 @@ public class FQLReplayTest
     {
         FQLQueryReader reader = new FQLQueryReader();
         File dir = Files.createTempDirectory("chronicle").toFile();
-        try (ChronicleQueue queue = ChronicleQueueBuilder.single(dir).build())
+        try (ChronicleQueue queue = SingleChronicleQueueBuilder.single(dir).build())
         {
             ExcerptAppender appender = queue.acquireAppender();
             appender.writeDocument(new BinLog.ReleaseableWriteMarshallable() {
@@ -686,7 +686,7 @@ public class FQLReplayTest
     {
         Random r = new Random();
         File dir = Files.createTempDirectory("chronicle").toFile();
-        try (ChronicleQueue readQueue = ChronicleQueueBuilder.single(dir).build())
+        try (ChronicleQueue readQueue = SingleChronicleQueueBuilder.single(dir).build())
         {
             ExcerptAppender appender = readQueue.acquireAppender();
 
@@ -771,8 +771,8 @@ public class FQLReplayTest
     private static List<Pair<FQLQuery, ResultHandler.ComparableResultSet>> readResultFile(File dir, File queryDir)
     {
         List<Pair<FQLQuery, ResultHandler.ComparableResultSet>> resultSets = new ArrayList<>();
-        try (ChronicleQueue q = ChronicleQueueBuilder.single(dir).build();
-             ChronicleQueue queryQ = ChronicleQueueBuilder.single(queryDir).build())
+        try (ChronicleQueue q = SingleChronicleQueueBuilder.single(dir).build();
+             ChronicleQueue queryQ = SingleChronicleQueueBuilder.single(queryDir).build())
         {
             ExcerptTailer queryTailer = queryQ.createTailer();
             FQLQueryReader queryReader = new FQLQueryReader();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org