Skip to content

Commit

Permalink
HSEARCH-2507 ElasticsearchIndexNameConflictIT is broken on file-insen…
Browse files Browse the repository at this point in the history
…sitive filesystems
  • Loading branch information
Sanne committed Dec 19, 2016
1 parent 05bc2c4 commit f3f6b9b
Showing 1 changed file with 13 additions and 13 deletions.
Expand Up @@ -34,21 +34,21 @@ public class ElasticsearchIndexNameConflictIT extends SearchInitializationTestBa
public void testNameCollisionDetection() {
thrown.expect( SearchException.class );
thrown.expectMessage( "HSEARCH000326" );
thrown.expectMessage( MyFirstEntity.class.getName() );
thrown.expectMessage( MyfirstEntity.class.getName() );
thrown.expectMessage( ElasticsearchIndexNameNormalizer.getElasticsearchIndexName( MyfirstEntity.class.getName() ) );
thrown.expectMessage( "MYFIRSTENTITY" );
thrown.expectMessage( "myfirstentity" );
thrown.expectMessage( ElasticsearchIndexNameNormalizer.getElasticsearchIndexName( "myfirstentity" ) );

init( MyFirstEntity.class, MyfirstEntity.class );
init( MyFirstEntityUpperCase.class, MyfirstEntityLowerCase.class );
}

@Test
public void testWithoutConflictWhenIndexIsRenamed() {
init( MySecondEntity.class, MysecondEntity.class );
init( MySecondEntityUpperCase.class, MysecondEntityLowerCase.class );
}

@Indexed
@Indexed(index = "MYFIRSTENTITY")
@Entity
static class MyFirstEntity {
static class MyFirstEntityUpperCase {

@DocumentId
@Id
Expand All @@ -58,9 +58,9 @@ static class MyFirstEntity {
boolean myField;
}

@Indexed
@Indexed(index = "myfirstentity")
@Entity
static class MyfirstEntity {
static class MyfirstEntityLowerCase {

@DocumentId
@Id
Expand All @@ -70,9 +70,9 @@ static class MyfirstEntity {
boolean myField;
}

@Indexed(index = "should_not_have_conflict")
@Indexed(index = "MYSECONDENTITY")
@Entity
static class MySecondEntity {
static class MySecondEntityUpperCase {

@DocumentId
@Id
Expand All @@ -82,9 +82,9 @@ static class MySecondEntity {
boolean myField;
}

@Indexed
@Indexed(index = "mysecondentityWithPostfix")
@Entity
static class MysecondEntity {
static class MysecondEntityLowerCase {

@DocumentId
@Id
Expand Down

0 comments on commit f3f6b9b

Please sign in to comment.