Skip to content

Commit

Permalink
HSEARCH-4526 Remove unnecessary uses of StaticCounters
Browse files Browse the repository at this point in the history
  • Loading branch information
yrodiere committed Apr 4, 2022
1 parent 2a443af commit 33f024b
Show file tree
Hide file tree
Showing 13 changed files with 0 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import org.hibernate.search.util.impl.integrationtest.mapper.orm.OrmUtils;
import org.hibernate.search.util.impl.test.annotation.PortedFromSearch5;
import org.hibernate.search.util.impl.test.annotation.TestForIssue;
import org.hibernate.search.util.impl.test.rule.StaticCounters;

import org.junit.Before;
import org.junit.Rule;
Expand All @@ -47,9 +46,6 @@ public class EnversIT {
@Rule
public OrmSetupHelper ormSetupHelper = OrmSetupHelper.withBackendMock( backendMock );

@Rule
public StaticCounters counters = new StaticCounters();

private SessionFactory sessionFactory;

@Before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import org.hibernate.search.mapper.pojo.model.PojoModelProperty;
import org.hibernate.search.util.impl.integrationtest.common.rule.BackendMock;
import org.hibernate.search.util.impl.integrationtest.mapper.orm.OrmSetupHelper;
import org.hibernate.search.util.impl.test.rule.StaticCounters;

import org.junit.Rule;
import org.junit.Test;
Expand All @@ -49,9 +48,6 @@ public class AnnotationMappingDiscoveryIT {
@Rule
public OrmSetupHelper ormSetupHelper = OrmSetupHelper.withBackendMock( backendMock );

@Rule
public StaticCounters counters = new StaticCounters();

@Test
public void discoveryEnabled() {
backendMock.expectSchema( IndexedEntity.INDEX, b -> b
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.hibernate.search.util.impl.integrationtest.common.rule.BackendMock;
import org.hibernate.search.util.impl.integrationtest.mapper.orm.OrmSetupHelper;
import org.hibernate.search.util.impl.integrationtest.mapper.orm.OrmUtils;
import org.hibernate.search.util.impl.test.rule.StaticCounters;

import org.junit.Before;
import org.junit.Rule;
Expand All @@ -36,9 +35,6 @@ public class GenericPropertyIT {
@Rule
public OrmSetupHelper ormSetupHelper = OrmSetupHelper.withBackendMock( backendMock );

@Rule
public StaticCounters counters = new StaticCounters();

private SessionFactory sessionFactory;

@Before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import org.hibernate.search.util.impl.integrationtest.common.rule.BackendMock;
import org.hibernate.search.util.impl.integrationtest.mapper.orm.OrmSetupHelper;
import org.hibernate.search.util.impl.integrationtest.mapper.orm.OrmUtils;
import org.hibernate.search.util.impl.test.rule.StaticCounters;

import org.junit.Before;
import org.junit.Rule;
Expand All @@ -35,9 +34,6 @@ public class PropertyInheritanceIT {
@Rule
public OrmSetupHelper ormSetupHelper = OrmSetupHelper.withBackendMock( backendMock );

@Rule
public StaticCounters counters = new StaticCounters();

private SessionFactory sessionFactory;

@Before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import org.hibernate.search.util.impl.integrationtest.common.rule.BackendMock;
import org.hibernate.search.util.impl.integrationtest.mapper.orm.OrmSetupHelper;
import org.hibernate.search.util.impl.integrationtest.mapper.orm.OrmUtils;
import org.hibernate.search.util.impl.test.rule.StaticCounters;

import org.junit.Rule;
import org.junit.Test;
Expand All @@ -44,9 +43,6 @@ public class TransientPropertyIT {
@Rule
public OrmSetupHelper ormSetupHelper = OrmSetupHelper.withBackendMock( backendMock );

@Rule
public StaticCounters counters = new StaticCounters();

@Test
public void withoutDerivedFrom() {
assertThatThrownBy(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import org.hibernate.search.util.impl.integrationtest.common.rule.StubSearchWorkBehavior;
import org.hibernate.search.util.impl.integrationtest.mapper.orm.OrmSetupHelper;
import org.hibernate.search.util.impl.integrationtest.mapper.orm.ReusableOrmSetupHolder;
import org.hibernate.search.util.impl.test.rule.StaticCounters;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
Expand All @@ -61,9 +60,6 @@ public class AnnotationMappingSmokeIT {
@Rule
public MethodRule setupHolderMethodRule = setupHolder.methodRule();

@Rule
public StaticCounters counters = new StaticCounters();

@ReusableOrmSetupHolder.Setup
public void setup(OrmSetupHelper.SetupContext setupContext) {
backendMock.expectSchema( OtherIndexedEntity.NAME, b -> b
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import org.hibernate.search.util.impl.integrationtest.common.rule.StubSearchWorkBehavior;
import org.hibernate.search.util.impl.integrationtest.mapper.orm.OrmSetupHelper;
import org.hibernate.search.util.impl.integrationtest.mapper.orm.ReusableOrmSetupHolder;
import org.hibernate.search.util.impl.test.rule.StaticCounters;

import org.junit.ClassRule;
import org.junit.Rule;
Expand All @@ -60,9 +59,6 @@ public class ProgrammaticMappingSmokeIT {
@Rule
public MethodRule setupHolderMethodRule = setupHolder.methodRule();

@Rule
public StaticCounters counters = new StaticCounters();

@ReusableOrmSetupHolder.Setup
public void setup(OrmSetupHelper.SetupContext setupContext) {
backendMock.expectSchema( OtherIndexedEntity.NAME, b -> b
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import org.hibernate.search.util.impl.integrationtest.common.rule.BackendMock;
import org.hibernate.search.util.impl.integrationtest.mapper.orm.OrmSetupHelper;
import org.hibernate.search.util.impl.integrationtest.mapper.orm.ReusableOrmSetupHolder;
import org.hibernate.search.util.impl.test.rule.StaticCounters;

import org.junit.ClassRule;
import org.junit.Rule;
Expand Down Expand Up @@ -51,9 +50,6 @@ public abstract class AbstractSearchWorkspaceSimpleOperationIT {
@Rule
public MethodRule setupHolderMethodRule = setupHolder.methodRule();

@Rule
public StaticCounters counters = new StaticCounters();

@ReusableOrmSetupHolder.Setup
public void setup(OrmSetupHelper.SetupContext setupContext) {
defaultBackendMock.expectAnySchema( IndexedEntity1.INDEX_NAME );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import org.hibernate.search.mapper.pojo.mapping.definition.programmatic.ProgrammaticMappingConfigurationContext;
import org.hibernate.search.mapper.pojo.model.PojoModelProperty;
import org.hibernate.search.util.impl.integrationtest.common.rule.BackendMock;
import org.hibernate.search.util.impl.test.rule.StaticCounters;

import org.junit.Rule;
import org.junit.Test;
Expand All @@ -43,9 +42,6 @@ public class AnnotationMappingDiscoveryIT {
@Rule
public JavaBeanMappingSetupHelper setupHelper = JavaBeanMappingSetupHelper.withBackendMock( MethodHandles.lookup(), backendMock );

@Rule
public StaticCounters counters = new StaticCounters();

@Test
public void discoveryEnabled() {
backendMock.expectSchema( IndexedEntity.INDEX, b -> b
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.PropertyValue;
import org.hibernate.search.integrationtest.mapper.pojo.testsupport.util.rule.JavaBeanMappingSetupHelper;
import org.hibernate.search.util.impl.integrationtest.common.rule.BackendMock;
import org.hibernate.search.util.impl.test.rule.StaticCounters;

import org.junit.Before;
import org.junit.Rule;
Expand All @@ -34,9 +33,6 @@ public class GenericPropertyIT {
@Rule
public JavaBeanMappingSetupHelper setupHelper = JavaBeanMappingSetupHelper.withBackendMock( MethodHandles.lookup(), backendMock );

@Rule
public StaticCounters counters = new StaticCounters();

private SearchMapping mapping;

@Before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.PropertyValue;
import org.hibernate.search.integrationtest.mapper.pojo.testsupport.util.rule.JavaBeanMappingSetupHelper;
import org.hibernate.search.util.impl.integrationtest.common.rule.BackendMock;
import org.hibernate.search.util.impl.test.rule.StaticCounters;

import org.junit.Before;
import org.junit.Rule;
Expand All @@ -34,9 +33,6 @@ public class PropertyInheritanceIT {
@Rule
public JavaBeanMappingSetupHelper setupHelper = JavaBeanMappingSetupHelper.withBackendMock( MethodHandles.lookup(), backendMock );

@Rule
public StaticCounters counters = new StaticCounters();

private SearchMapping mapping;

@Before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
import org.hibernate.search.util.common.impl.CollectionHelper;
import org.hibernate.search.util.impl.integrationtest.common.rule.BackendMock;
import org.hibernate.search.util.impl.integrationtest.common.rule.StubSearchWorkBehavior;
import org.hibernate.search.util.impl.test.rule.StaticCounters;

import org.junit.Before;
import org.junit.Rule;
Expand All @@ -59,9 +58,6 @@ public class AnnotationMappingSmokeIT {
@Rule
public JavaBeanMappingSetupHelper setupHelper = JavaBeanMappingSetupHelper.withBackendMock( MethodHandles.lookup(), backendMock );

@Rule
public StaticCounters counters = new StaticCounters();

private SearchMapping mapping;

@Before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import org.hibernate.search.util.common.impl.CollectionHelper;
import org.hibernate.search.util.impl.integrationtest.common.rule.BackendMock;
import org.hibernate.search.util.impl.integrationtest.common.rule.StubSearchWorkBehavior;
import org.hibernate.search.util.impl.test.rule.StaticCounters;

import org.junit.Before;
import org.junit.Rule;
Expand All @@ -51,9 +50,6 @@ public class ProgrammaticMappingSmokeIT {
@Rule
public JavaBeanMappingSetupHelper setupHelper = JavaBeanMappingSetupHelper.withBackendMock( MethodHandles.lookup(), backendMock );

@Rule
public StaticCounters counters = new StaticCounters();

private SearchMapping mapping;

@Before
Expand Down

0 comments on commit 33f024b

Please sign in to comment.