Skip to content

Commit 61039c6

Browse files
committed
hibernate-infinispan module testsuite code format only
1 parent b859388 commit 61039c6

File tree

67 files changed

+6610
-6047
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+6610
-6047
lines changed

hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/AbstractNonFunctionalTestCase.java

Lines changed: 61 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -40,62 +40,66 @@
4040
* @since 3.5
4141
*/
4242
public abstract class AbstractNonFunctionalTestCase extends org.hibernate.testing.junit4.BaseUnitTestCase {
43-
private static final Logger log = Logger.getLogger(AbstractNonFunctionalTestCase.class);
44-
45-
public static final String REGION_PREFIX = "test";
46-
47-
private static final String PREFER_IPV4STACK = "java.net.preferIPv4Stack";
48-
private String preferIPv4Stack;
49-
private static final String JGROUPS_CFG_FILE = "hibernate.cache.infinispan.jgroups_cfg";
50-
private String jgroupsCfgFile;
51-
52-
private CacheTestSupport testSupport = new CacheTestSupport();
53-
54-
@Before
55-
public void prepareCacheSupport() throws Exception {
56-
preferIPv4Stack = System.getProperty(PREFER_IPV4STACK);
57-
System.setProperty(PREFER_IPV4STACK, "true");
58-
jgroupsCfgFile = System.getProperty(JGROUPS_CFG_FILE);
59-
System.setProperty(JGROUPS_CFG_FILE, "2lc-test-tcp.xml");
60-
61-
testSupport.setUp();
62-
}
63-
64-
@After
65-
public void releaseCachSupport() throws Exception {
66-
testSupport.tearDown();
67-
68-
if (preferIPv4Stack == null) {
69-
System.clearProperty(PREFER_IPV4STACK);
70-
} else {
71-
System.setProperty(PREFER_IPV4STACK, preferIPv4Stack);
72-
}
73-
74-
if (jgroupsCfgFile == null)
75-
System.clearProperty(JGROUPS_CFG_FILE);
76-
else
77-
System.setProperty(JGROUPS_CFG_FILE, jgroupsCfgFile);
78-
}
79-
80-
81-
protected CacheTestSupport getCacheTestSupport() {
82-
return testSupport;
83-
}
84-
85-
protected void sleep(long ms) {
86-
try {
87-
Thread.sleep(ms);
88-
} catch (InterruptedException e) {
89-
log.warn("Interrupted during sleep", e);
90-
}
91-
}
92-
93-
protected void avoidConcurrentFlush() {
94-
testSupport.avoidConcurrentFlush();
95-
}
96-
97-
protected int getValidKeyCount(Set keys) {
98-
return keys.size();
99-
}
43+
private static final Logger log = Logger.getLogger( AbstractNonFunctionalTestCase.class );
44+
45+
public static final String REGION_PREFIX = "test";
46+
47+
private static final String PREFER_IPV4STACK = "java.net.preferIPv4Stack";
48+
private String preferIPv4Stack;
49+
private static final String JGROUPS_CFG_FILE = "hibernate.cache.infinispan.jgroups_cfg";
50+
private String jgroupsCfgFile;
51+
52+
private CacheTestSupport testSupport = new CacheTestSupport();
53+
54+
@Before
55+
public void prepareCacheSupport() throws Exception {
56+
preferIPv4Stack = System.getProperty( PREFER_IPV4STACK );
57+
System.setProperty( PREFER_IPV4STACK, "true" );
58+
jgroupsCfgFile = System.getProperty( JGROUPS_CFG_FILE );
59+
System.setProperty( JGROUPS_CFG_FILE, "2lc-test-tcp.xml" );
60+
61+
testSupport.setUp();
62+
}
63+
64+
@After
65+
public void releaseCachSupport() throws Exception {
66+
testSupport.tearDown();
67+
68+
if ( preferIPv4Stack == null ) {
69+
System.clearProperty( PREFER_IPV4STACK );
70+
}
71+
else {
72+
System.setProperty( PREFER_IPV4STACK, preferIPv4Stack );
73+
}
74+
75+
if ( jgroupsCfgFile == null ) {
76+
System.clearProperty( JGROUPS_CFG_FILE );
77+
}
78+
else {
79+
System.setProperty( JGROUPS_CFG_FILE, jgroupsCfgFile );
80+
}
81+
}
82+
83+
84+
protected CacheTestSupport getCacheTestSupport() {
85+
return testSupport;
86+
}
87+
88+
protected void sleep(long ms) {
89+
try {
90+
Thread.sleep( ms );
91+
}
92+
catch ( InterruptedException e ) {
93+
log.warn( "Interrupted during sleep", e );
94+
}
95+
}
96+
97+
protected void avoidConcurrentFlush() {
98+
testSupport.avoidConcurrentFlush();
99+
}
100+
101+
protected int getValidKeyCount(Set keys) {
102+
return keys.size();
103+
}
100104

101105
}

hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/AbstractRegionImplTestCase.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,27 @@
3030
import org.hibernate.cache.spi.CacheDataDescription;
3131
import org.hibernate.cache.spi.Region;
3232
import org.hibernate.internal.util.compare.ComparableComparator;
33+
3334
import org.infinispan.AdvancedCache;
3435

3536
/**
3637
* Base class for tests of Region implementations.
37-
*
38+
*
3839
* @author Galder Zamarreño
3940
* @since 3.5
4041
*/
4142
public abstract class AbstractRegionImplTestCase extends AbstractNonFunctionalTestCase {
4243

43-
protected abstract AdvancedCache getInfinispanCache(InfinispanRegionFactory regionFactory);
44+
protected abstract AdvancedCache getInfinispanCache(InfinispanRegionFactory regionFactory);
4445

45-
protected abstract Region createRegion(InfinispanRegionFactory regionFactory, String regionName, Properties properties, CacheDataDescription cdd);
46+
protected abstract Region createRegion(InfinispanRegionFactory regionFactory, String regionName, Properties properties, CacheDataDescription cdd);
4647

47-
protected abstract void putInRegion(Region region, Object key, Object value);
48+
protected abstract void putInRegion(Region region, Object key, Object value);
4849

49-
protected abstract void removeFromRegion(Region region, Object key);
50+
protected abstract void removeFromRegion(Region region, Object key);
5051

51-
protected CacheDataDescription getCacheDataDescription() {
52-
return new CacheDataDescriptionImpl(true, true, ComparableComparator.INSTANCE);
53-
}
52+
protected CacheDataDescription getCacheDataDescription() {
53+
return new CacheDataDescriptionImpl( true, true, ComparableComparator.INSTANCE );
54+
}
5455

5556
}

0 commit comments

Comments
 (0)