Skip to content

Commit

Permalink
Rename test
Browse files Browse the repository at this point in the history
  • Loading branch information
pivovarit committed Jun 5, 2018
1 parent eb746f5 commit 836722c
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @author Donato Rimenti
*
*/
public class SingletonSynchronizationUnitTest {
public class SingletonSynchronizationIntegrationTest {

/**
* Size of the thread pools used.
Expand All @@ -33,7 +33,7 @@ public class SingletonSynchronizationUnitTest {
@Test
public void givenDraconianSingleton_whenMultithreadInstancesEquals_thenTrue() {
ExecutorService executor = Executors.newFixedThreadPool(POOL_SIZE);
Set<DraconianSingleton> resultSet = Collections.synchronizedSet(new HashSet<DraconianSingleton>());
Set<DraconianSingleton> resultSet = Collections.synchronizedSet(new HashSet<>());

// Submits the instantiation tasks.
for (int i = 0; i < TASKS_TO_SUBMIT; i++) {
Expand All @@ -51,7 +51,7 @@ public void givenDraconianSingleton_whenMultithreadInstancesEquals_thenTrue() {
@Test
public void givenDclSingleton_whenMultithreadInstancesEquals_thenTrue() {
ExecutorService executor = Executors.newFixedThreadPool(POOL_SIZE);
Set<DclSingleton> resultSet = Collections.synchronizedSet(new HashSet<DclSingleton>());
Set<DclSingleton> resultSet = Collections.synchronizedSet(new HashSet<>());

// Submits the instantiation tasks.
for (int i = 0; i < TASKS_TO_SUBMIT; i++) {
Expand All @@ -69,7 +69,7 @@ public void givenDclSingleton_whenMultithreadInstancesEquals_thenTrue() {
@Test
public void givenEarlyInitSingleton_whenMultithreadInstancesEquals_thenTrue() {
ExecutorService executor = Executors.newFixedThreadPool(POOL_SIZE);
Set<EarlyInitSingleton> resultSet = Collections.synchronizedSet(new HashSet<EarlyInitSingleton>());
Set<EarlyInitSingleton> resultSet = Collections.synchronizedSet(new HashSet<>());

// Submits the instantiation tasks.
for (int i = 0; i < TASKS_TO_SUBMIT; i++) {
Expand All @@ -87,7 +87,7 @@ public void givenEarlyInitSingleton_whenMultithreadInstancesEquals_thenTrue() {
@Test
public void givenInitOnDemandSingleton_whenMultithreadInstancesEquals_thenTrue() {
ExecutorService executor = Executors.newFixedThreadPool(POOL_SIZE);
Set<InitOnDemandSingleton> resultSet = Collections.synchronizedSet(new HashSet<InitOnDemandSingleton>());
Set<InitOnDemandSingleton> resultSet = Collections.synchronizedSet(new HashSet<>());

// Submits the instantiation tasks.
for (int i = 0; i < TASKS_TO_SUBMIT; i++) {
Expand All @@ -105,7 +105,7 @@ public void givenInitOnDemandSingleton_whenMultithreadInstancesEquals_thenTrue()
@Test
public void givenEnumSingleton_whenMultithreadInstancesEquals_thenTrue() {
ExecutorService executor = Executors.newFixedThreadPool(POOL_SIZE);
Set<EnumSingleton> resultSet = Collections.synchronizedSet(new HashSet<EnumSingleton>());
Set<EnumSingleton> resultSet = Collections.synchronizedSet(new HashSet<>());

// Submits the instantiation tasks.
for (int i = 0; i < TASKS_TO_SUBMIT; i++) {
Expand Down

0 comments on commit 836722c

Please sign in to comment.