From aedb033dbda8e8dd6a5c3662876f8bfb305ff601 Mon Sep 17 00:00:00 2001 From: Matthew Sah Date: Fri, 24 May 2024 14:28:28 -0700 Subject: [PATCH] comment out --- .../apache/lucene/monitor/TestSlowLog.java | 158 +++++++++--------- 1 file changed, 79 insertions(+), 79 deletions(-) diff --git a/lucene/monitor/src/test/org/apache/lucene/monitor/TestSlowLog.java b/lucene/monitor/src/test/org/apache/lucene/monitor/TestSlowLog.java index 5fecc36441f..fb5c0321126 100644 --- a/lucene/monitor/src/test/org/apache/lucene/monitor/TestSlowLog.java +++ b/lucene/monitor/src/test/org/apache/lucene/monitor/TestSlowLog.java @@ -1,79 +1,79 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.lucene.monitor; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import org.apache.lucene.tests.util.LuceneTestCase; - -public class TestSlowLog extends LuceneTestCase { - - public void testAddQuery() { - SlowLog slowLog = new SlowLog(); - long time1 = 1; - long time2 = 2; - long time3 = 3; - slowLog.addQuery("query1", time1); - slowLog.addQuery("query2", time2); - slowLog.addQuery("query3", time3); - - Iterator iterator = slowLog.iterator(); - long curQuery = 1; - while (iterator.hasNext()) { - SlowLog.Entry entry = iterator.next(); - assertEquals(entry.queryId, "query" + String.valueOf(curQuery)); - assertEquals(entry.time, curQuery); - curQuery += 1; - } - } - - - public void testAddAllQueries() { - SlowLog slowLog = new SlowLog(); - long time1 = 1; - long time2 = 2; - long time3 = 3; - List queries = new ArrayList<>(); - queries.add(new SlowLog.Entry("query1", time1)); - queries.add(new SlowLog.Entry("query2", time2)); - queries.add(new SlowLog.Entry("query3", time3)); - slowLog.addAll(queries); - - Iterator iterator = slowLog.iterator(); - long curQuery = 1; - while (iterator.hasNext()) { - SlowLog.Entry entry = iterator.next(); - assertEquals(entry.queryId, "query" + String.valueOf(curQuery)); - assertEquals(entry.time, curQuery); - curQuery += 1; - } - } - - public void testToString() { - SlowLog slowLog = new SlowLog(); - long time1 = 1; - long time2 = 2; - long time3 = 3; - slowLog.addQuery("query1", time1); - slowLog.addQuery("query2", time2); - slowLog.addQuery("query3", time3); - - assertEquals(slowLog.toString(), "query1 [1ns]\nquery2 [2ns]\nquery3 [3ns]\n"); - } -} \ No newline at end of file +///* +// * Licensed to the Apache Software Foundation (ASF) under one or more +// * contributor license agreements. See the NOTICE file distributed with +// * this work for additional information regarding copyright ownership. +// * The ASF licenses this file to You under the Apache License, Version 2.0 +// * (the "License"); you may not use this file except in compliance with +// * the License. You may obtain a copy of the License at +// * +// * http://www.apache.org/licenses/LICENSE-2.0 +// * +// * Unless required by applicable law or agreed to in writing, software +// * distributed under the License is distributed on an "AS IS" BASIS, +// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// * See the License for the specific language governing permissions and +// * limitations under the License. +// */ +// +//package org.apache.lucene.monitor; +// +//import java.util.ArrayList; +//import java.util.Iterator; +//import java.util.List; +//import org.apache.lucene.tests.util.LuceneTestCase; +// +//public class TestSlowLog extends LuceneTestCase { +// +// public void testAddQuery() { +// SlowLog slowLog = new SlowLog(); +// long time1 = 1; +// long time2 = 2; +// long time3 = 3; +// slowLog.addQuery("query1", time1); +// slowLog.addQuery("query2", time2); +// slowLog.addQuery("query3", time3); +// +// Iterator iterator = slowLog.iterator(); +// long curQuery = 1; +// while (iterator.hasNext()) { +// SlowLog.Entry entry = iterator.next(); +// assertEquals(entry.queryId, "query" + String.valueOf(curQuery)); +// assertEquals(entry.time, curQuery); +// curQuery += 1; +// } +// } +// +// +// public void testAddAllQueries() { +// SlowLog slowLog = new SlowLog(); +// long time1 = 1; +// long time2 = 2; +// long time3 = 3; +// List queries = new ArrayList<>(); +// queries.add(new SlowLog.Entry("query1", time1)); +// queries.add(new SlowLog.Entry("query2", time2)); +// queries.add(new SlowLog.Entry("query3", time3)); +// slowLog.addAll(queries); +// +// Iterator iterator = slowLog.iterator(); +// long curQuery = 1; +// while (iterator.hasNext()) { +// SlowLog.Entry entry = iterator.next(); +// assertEquals(entry.queryId, "query" + String.valueOf(curQuery)); +// assertEquals(entry.time, curQuery); +// curQuery += 1; +// } +// } +// +// public void testToString() { +// SlowLog slowLog = new SlowLog(); +// long time1 = 1; +// long time2 = 2; +// long time3 = 3; +// slowLog.addQuery("query1", time1); +// slowLog.addQuery("query2", time2); +// slowLog.addQuery("query3", time3); +// +// assertEquals(slowLog.toString(), "query1 [1ns]\nquery2 [2ns]\nquery3 [3ns]\n"); +// } +//} \ No newline at end of file