Skip to content

Reproduce infix search bug #335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1488,6 +1488,17 @@ public void testSearchReproII(SearchType type) {
Assert.assertEquals(records, store.search(key, query));
}

@Test
@Theory
public void testSearchReproJ(SearchType type) {
String query = "j6 0 3d 30ts 58kccxj289c2w0ltrvq7l5izsq1w0ijglflziauimx4j8q4u6b6 jd5rers2fvhaul0jep39q75ww0z";
String key = "aykyzbbvhfnfwcmkahgznuntgmezvdfqitiyfgsvwpfjdhfgzrqnvorktqgmzighdkwlflstbmmfdjdbpeazpzmry";
Set<Long> records = setupSearchTest(key, query, type,
Lists.newArrayList(-6133512025041655722L), Lists.newArrayList(
"2sknz7mcn8clxncb3pch4yu0fvxih02w9x4dg3qg61htrmzgj6vvjpl1p9r v0d6j6 0 3d 30ts 58kccxj289c2w0ltrvq7l5izsq1w0ijglflziauimx4j8q4u6b6 jd5rers2fvhaul0jep39q75ww0z"));
Assert.assertEquals(records, store.search(key, query));
}

@Test
@Ignore("not implemented in Limbo")
public void testSearchResultSorting() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright (c) 2013-2018 Cinchapi Inc.
*
* Licensed 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 com.cinchapi.concourse.util;

import org.junit.Assert;
import org.junit.Test;

/**
* Unit tests for {@link TStrings}
*
* @author jeff
*/
public class TStringsTest {

@Test
public void testIsInfixSearchMatch() {
Assert.assertTrue(TStrings.isInfixSearchMatch(
"j6 0 3d 30ts 58kccxj289c2w0ltrvq7l5izsq1w0ijglflziauimx4j8q4u6b6 jd5rers2fvhaul0jep39q75ww0z",
"2sknz7mcn8clxncb3pch4yu0fvxih02w9x4dg3qg61htrmzgj6vvjpl1p9r v0d6j6 0 3d 30ts 58kccxj289c2w0ltrvq7l5izsq1w0ijglflziauimx4j8q4u6b6 jd5rers2fvhaul0jep39q75ww0z"));
}

}