Skip to content

Commit 801a11b

Browse files
committed
Uncomment but Ignore SearchEngineTest.testSearch()
1 parent 05801be commit 801a11b

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

opengrok-indexer/src/test/java/org/opengrok/indexer/search/SearchEngineTest.java

+15-19
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,36 @@
2424

2525
package org.opengrok.indexer.search;
2626

27+
import static org.junit.Assert.assertEquals;
28+
import static org.junit.Assert.assertFalse;
29+
import static org.junit.Assert.assertNull;
30+
import static org.junit.Assert.assertTrue;
31+
import static org.junit.Assert.fail;
32+
2733
import java.io.File;
34+
import java.util.ArrayList;
2835
import java.util.Collections;
36+
import java.util.List;
2937
import java.util.TreeSet;
30-
import org.junit.After;
3138
import org.junit.AfterClass;
32-
import org.junit.Before;
3339
import org.junit.BeforeClass;
40+
import org.junit.Ignore;
3441
import org.junit.Test;
3542
import org.opengrok.indexer.configuration.RuntimeEnvironment;
3643
import org.opengrok.indexer.history.HistoryGuru;
44+
import org.opengrok.indexer.history.RepositoryFactory;
3745
import org.opengrok.indexer.index.Indexer;
3846
import org.opengrok.indexer.util.TestRepository;
3947

40-
import static org.junit.Assert.*;
41-
import org.opengrok.indexer.history.RepositoryFactory;
42-
4348
/**
4449
* Do basic testing of the SearchEngine
4550
*
4651
* @author Trond Norbye
4752
*/
4853
public class SearchEngineTest {
4954

50-
static TestRepository repository;
51-
static File configFile;
55+
private static TestRepository repository;
56+
private static File configFile;
5257

5358
@BeforeClass
5459
public static void setUpClass() throws Exception {
@@ -75,19 +80,11 @@ public static void setUpClass() throws Exception {
7580
}
7681

7782
@AfterClass
78-
public static void tearDownClass() throws Exception {
83+
public static void tearDownClass() {
7984
repository.destroy();
8085
configFile.delete();
8186
}
8287

83-
@Before
84-
public void setUp() {
85-
}
86-
87-
@After
88-
public void tearDown() {
89-
}
90-
9188
@Test
9289
public void testIsValidQuery() {
9390
SearchEngine instance = new SearchEngine();
@@ -142,7 +139,7 @@ public void testSymbol() {
142139
}
143140

144141
@Test
145-
public void testGetQuery() throws Exception {
142+
public void testGetQuery() {
146143
SearchEngine instance = new SearchEngine();
147144
instance.setHistory("Once upon a time");
148145
instance.setFile("Makefile");
@@ -154,8 +151,8 @@ public void testGetQuery() throws Exception {
154151
instance.getQuery());
155152
}
156153

157-
/* see https://github.com/oracle/opengrok/issues/2030
158154
@Test
155+
@Ignore("See https://github.com/oracle/opengrok/issues/2030")
159156
public void testSearch() {
160157
List<Hit> hits = new ArrayList<>();
161158

@@ -282,5 +279,4 @@ public void testSearch() {
282279
assertEquals(1, instance.search());
283280
instance.destroy();
284281
}
285-
*/
286282
}

0 commit comments

Comments
 (0)