(query) Mark flaky test, correct assert on test

This commit is contained in:
Viktor Lofgren 2024-04-21 12:30:14 +02:00
parent f46733a47a
commit ad2ac8eee3
2 changed files with 3 additions and 3 deletions

View File

@ -100,7 +100,7 @@ class QWordGraphTest {
assertEquals("a b ( c | d )", graph.compileToQuery());
}
@Test
@Test // this test is a bit flaky, the order of the variants is not guaranteed
void testCompile5() {
// Construct a graph like

View File

@ -134,7 +134,7 @@ public class QueryFactoryTest {
{
// tde isn't a stopword, so we should get the normal behavior
var specs = parseAndGetSpecs("\"tde shining\"");
assertEquals("tde shining", specs.query.compiledQuery);
assertEquals("( shining tde | tde_shining )", specs.query.compiledQuery);
assertEquals(List.of("tde_shining"), specs.query.searchTermsAdvice);
assertEquals(List.of(List.of("tde", "shining")), specs.query.searchTermCoherences);
}
@ -192,7 +192,7 @@ public class QueryFactoryTest {
@Test
public void testExpansion3() {
long start = System.currentTimeMillis();
var subquery = parseAndGetSpecs("plato's republic").query;
var subquery = parseAndGetSpecs("buy rimonabant buy acomplia");
System.out.println("Time: " + (System.currentTimeMillis() - start));
System.out.println(subquery);
}