From bed94698a421f75582170287c3650038c0ad2c46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotrek=20=C5=BBygie=C5=82o?= Date: Fri, 8 Nov 2019 23:47:02 +0100 Subject: [PATCH 1/5] UTs for HazelcastTimerStore --- .../hazelcast-ejb-timer/pom.xml | 6 ++ .../timer/hazelcast/HazelcastTimerStore.java | 10 +++- .../HazelcastTimerStoreEmptyTimersTest.java | 29 +++++++++ .../hazelcast/HazelcastTimerStoreTest.java | 60 +++++++++++++++++++ .../HazelcastTimerStoreTestBase.java | 10 ++++ 5 files changed, 112 insertions(+), 3 deletions(-) create mode 100644 appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreEmptyTimersTest.java create mode 100644 appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTest.java create mode 100644 appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTestBase.java diff --git a/appserver/payara-appserver-modules/hazelcast-ejb-timer/pom.xml b/appserver/payara-appserver-modules/hazelcast-ejb-timer/pom.xml index d3bba923909..8fb1fd2bcee 100644 --- a/appserver/payara-appserver-modules/hazelcast-ejb-timer/pom.xml +++ b/appserver/payara-appserver-modules/hazelcast-ejb-timer/pom.xml @@ -79,5 +79,11 @@ javaee-api ${javaee.api.version} + + org.mockito + mockito-core + ${mockito.version} + test + diff --git a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/main/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStore.java b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/main/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStore.java index e9ba363b43a..c5b1abd2ade 100644 --- a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/main/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStore.java +++ b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/main/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStore.java @@ -471,13 +471,12 @@ protected boolean isValidTimerForThisServer(TimerPrimaryKey timerId, RuntimeTime return result; } - @Override - public String[] listTimers(String[] serverIds) { + static String [] listTimers(Collection timers, String[] serverIds) { String result[] = new String[serverIds.length]; // count all server ids HashMap counts = new HashMap<>(); - for (Object timer : pkCache.values()) { + for (Object timer : timers) { HZTimer hzTimer = (HZTimer) timer; String serverName = hzTimer.getMemberName(); Long val = counts.get(serverName); @@ -499,6 +498,11 @@ public String[] listTimers(String[] serverIds) { return result; } + @Override + public String[] listTimers(String[] serverIds) { + return listTimers(pkCache.values(), serverIds); + } + @Override public int migrateTimers(String fromOwnerId) { String ownerIdOfThisServer = getOwnerIdOfThisServer(); diff --git a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreEmptyTimersTest.java b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreEmptyTimersTest.java new file mode 100644 index 00000000000..189d58520d3 --- /dev/null +++ b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreEmptyTimersTest.java @@ -0,0 +1,29 @@ +package fish.payara.ejb.timer.hazelcast; + +import java.util.Collection; +import java.util.Collections; + +import org.junit.Test; + +public class HazelcastTimerStoreEmptyTimersTest extends HazelcastTimerStoreTestBase { + private Collection timers = Collections.emptyList(); + + @Test + public void emptyTimersShallResultInZeroTimersCountedForServer() { + String [] serverIds = new String[] { "a" }; + + String [] counts = callListTimers(timers, serverIds); + + assert counts[0].equals("0") : "With no timers defined, zero timers is expected for given server id"; + } + + @Test + public void emptyTimersShallResultInArrayOfTheSameSizeAsServerIds() { + String [] serverIds = new String[] { "a", "b", "c", "d" }; + + String [] counts = callListTimers(timers, serverIds); + + assert counts.length == serverIds.length : "Size of counters array shall match the size of server ids array"; + } +} + diff --git a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTest.java b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTest.java new file mode 100644 index 00000000000..0a3e6564600 --- /dev/null +++ b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTest.java @@ -0,0 +1,60 @@ +package fish.payara.ejb.timer.hazelcast; + +import java.util.Collection; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.runners.MockitoJUnitRunner; + +import static java.util.Arrays.asList; + +import static org.mockito.Mockito.when; + +@RunWith(MockitoJUnitRunner.class) +public class HazelcastTimerStoreTest extends HazelcastTimerStoreTestBase { + @Mock + private HZTimer timer1, timer2, timer3; + + private Collection timers; + + @Before + public void setUpTimers() { + timers = asList(timer1, timer2, timer3); + when(timer1.getMemberName()).thenReturn("jb"); + when(timer2.getMemberName()).thenReturn("hz"); + when(timer3.getMemberName()).thenReturn("jb"); + } + + + @Test + public void twoTimersForTheSameMemberNameShallBeCountedForTheSameServerId() { + String [] serverIds = new String[] { "jb" }; + + String [] counts = callListTimers(timers, serverIds); + + assert counts[0].equals("2"); + } + + @Test + public void countOneTimer() { + String [] serverIds = new String[] { "hz" }; + + String [] counts = callListTimers(timers, serverIds); + + assert counts[0].equals("1"); + } + + @Test + public void noNullsExpectedInCountsForMissingTimers() { + String [] serverIds = new String[] { "jb", "ltd", "hz" }; + + String [] counts = callListTimers(timers, serverIds); + + for (String count : counts) { + assert count != null : "Even for missing timers/server ids no null is expected but rather some representation of zero"; + } + } +} + diff --git a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTestBase.java b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTestBase.java new file mode 100644 index 00000000000..5275efd2b93 --- /dev/null +++ b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTestBase.java @@ -0,0 +1,10 @@ +package fish.payara.ejb.timer.hazelcast; + +import java.util.Collection; + +public abstract class HazelcastTimerStoreTestBase { + public String[] callListTimers(Collection timers, String[] serverIds) { + return HazelcastTimerStore.listTimers(timers, serverIds); + } +} + From b626e1acec65c8d361bcfca40cf49c8b8d6c0609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotrek=20=C5=BBygie=C5=82o?= Date: Sat, 9 Nov 2019 10:52:07 +0100 Subject: [PATCH 2/5] Test order of counters --- .../ejb/timer/hazelcast/HazelcastTimerStoreTest.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTest.java b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTest.java index 0a3e6564600..93f227b9b42 100644 --- a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTest.java +++ b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTest.java @@ -56,5 +56,16 @@ public void noNullsExpectedInCountsForMissingTimers() { assert count != null : "Even for missing timers/server ids no null is expected but rather some representation of zero"; } } + + @Test + public void countersShallFollowServerIdOrder() { + String [] serverIds = new String[] { "hz", "ltd", "jb" }; + + String [] counts = callListTimers(timers, serverIds); + + assert counts[0].equals("1"); + assert counts[1].equals("0"); + assert counts[2].equals("2"); + } } From 099547f8a2bd813954ef8a613919e651d795246c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotrek=20=C5=BBygie=C5=82o?= Date: Sat, 9 Nov 2019 12:03:27 +0100 Subject: [PATCH 3/5] Use HZTimer type for Collection --- .../payara/ejb/timer/hazelcast/HazelcastTimerStore.java | 9 ++++----- .../hazelcast/HazelcastTimerStoreEmptyTimersTest.java | 2 +- .../ejb/timer/hazelcast/HazelcastTimerStoreTest.java | 2 +- .../ejb/timer/hazelcast/HazelcastTimerStoreTestBase.java | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/main/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStore.java b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/main/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStore.java index c5b1abd2ade..2d8c0376b4a 100644 --- a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/main/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStore.java +++ b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/main/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStore.java @@ -471,14 +471,13 @@ protected boolean isValidTimerForThisServer(TimerPrimaryKey timerId, RuntimeTime return result; } - static String [] listTimers(Collection timers, String[] serverIds) { + static String [] listTimers(Collection timers, String[] serverIds) { String result[] = new String[serverIds.length]; // count all server ids HashMap counts = new HashMap<>(); - for (Object timer : timers) { - HZTimer hzTimer = (HZTimer) timer; - String serverName = hzTimer.getMemberName(); + for (HZTimer timer : timers) { + String serverName = timer.getMemberName(); Long val = counts.get(serverName); if (val == null) { val = new Long(0); @@ -500,7 +499,7 @@ protected boolean isValidTimerForThisServer(TimerPrimaryKey timerId, RuntimeTime @Override public String[] listTimers(String[] serverIds) { - return listTimers(pkCache.values(), serverIds); + return listTimers((Collection)pkCache.values(), serverIds); } @Override diff --git a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreEmptyTimersTest.java b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreEmptyTimersTest.java index 189d58520d3..cfc6d057375 100644 --- a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreEmptyTimersTest.java +++ b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreEmptyTimersTest.java @@ -6,7 +6,7 @@ import org.junit.Test; public class HazelcastTimerStoreEmptyTimersTest extends HazelcastTimerStoreTestBase { - private Collection timers = Collections.emptyList(); + private Collection timers = Collections.emptyList(); @Test public void emptyTimersShallResultInZeroTimersCountedForServer() { diff --git a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTest.java b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTest.java index 93f227b9b42..81275fcf14a 100644 --- a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTest.java +++ b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTest.java @@ -17,7 +17,7 @@ public class HazelcastTimerStoreTest extends HazelcastTimerStoreTestBase { @Mock private HZTimer timer1, timer2, timer3; - private Collection timers; + private Collection timers; @Before public void setUpTimers() { diff --git a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTestBase.java b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTestBase.java index 5275efd2b93..88782251b45 100644 --- a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTestBase.java +++ b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTestBase.java @@ -3,7 +3,7 @@ import java.util.Collection; public abstract class HazelcastTimerStoreTestBase { - public String[] callListTimers(Collection timers, String[] serverIds) { + public String[] callListTimers(Collection timers, String[] serverIds) { return HazelcastTimerStore.listTimers(timers, serverIds); } } From 4a86532c883b2ff009ac15727607444b3467cbb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotrek=20=C5=BBygie=C5=82o?= Date: Wed, 27 Nov 2019 11:21:31 +0100 Subject: [PATCH 4/5] Use JUnit's asserts --- .../HazelcastTimerStoreEmptyTimersTest.java | 6 ++++-- .../timer/hazelcast/HazelcastTimerStoreTest.java | 14 ++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreEmptyTimersTest.java b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreEmptyTimersTest.java index cfc6d057375..e0cbe27cbb6 100644 --- a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreEmptyTimersTest.java +++ b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreEmptyTimersTest.java @@ -5,6 +5,8 @@ import org.junit.Test; +import static org.junit.Assert.assertEquals; + public class HazelcastTimerStoreEmptyTimersTest extends HazelcastTimerStoreTestBase { private Collection timers = Collections.emptyList(); @@ -14,7 +16,7 @@ public void emptyTimersShallResultInZeroTimersCountedForServer() { String [] counts = callListTimers(timers, serverIds); - assert counts[0].equals("0") : "With no timers defined, zero timers is expected for given server id"; + assertEquals("With no timers defined, zero timers is expected for given server id", "0", counts[0]); } @Test @@ -23,7 +25,7 @@ public void emptyTimersShallResultInArrayOfTheSameSizeAsServerIds() { String [] counts = callListTimers(timers, serverIds); - assert counts.length == serverIds.length : "Size of counters array shall match the size of server ids array"; + assertEquals("Size of counters array shall match the size of server ids array", serverIds.length, counts.length); } } diff --git a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTest.java b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTest.java index 81275fcf14a..3a9321c3020 100644 --- a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTest.java +++ b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTest.java @@ -10,6 +10,8 @@ import static java.util.Arrays.asList; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.when; @RunWith(MockitoJUnitRunner.class) @@ -34,7 +36,7 @@ public void twoTimersForTheSameMemberNameShallBeCountedForTheSameServerId() { String [] counts = callListTimers(timers, serverIds); - assert counts[0].equals("2"); + assertEquals("2", counts[0]); } @Test @@ -43,7 +45,7 @@ public void countOneTimer() { String [] counts = callListTimers(timers, serverIds); - assert counts[0].equals("1"); + assertEquals("1", counts[0]); } @Test @@ -53,7 +55,7 @@ public void noNullsExpectedInCountsForMissingTimers() { String [] counts = callListTimers(timers, serverIds); for (String count : counts) { - assert count != null : "Even for missing timers/server ids no null is expected but rather some representation of zero"; + assertNotNull("Even for missing timers/server ids no null is expected but rather some representation of zero", count); } } @@ -63,9 +65,9 @@ public void countersShallFollowServerIdOrder() { String [] counts = callListTimers(timers, serverIds); - assert counts[0].equals("1"); - assert counts[1].equals("0"); - assert counts[2].equals("2"); + assertEquals("1", counts[0]); + assertEquals("0", counts[1]); + assertEquals("2", counts[2]); } } From 338b44fb122ebd3b2ca4ab68664ce75aeadc3bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotrek=20=C5=BBygie=C5=82o?= Date: Wed, 27 Nov 2019 11:54:47 +0100 Subject: [PATCH 5/5] Use varargs to accept serverIds --- .../HazelcastTimerStoreEmptyTimersTest.java | 10 +++------- .../timer/hazelcast/HazelcastTimerStoreTest.java | 16 ++++------------ .../hazelcast/HazelcastTimerStoreTestBase.java | 2 +- 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreEmptyTimersTest.java b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreEmptyTimersTest.java index e0cbe27cbb6..99b29cb470b 100644 --- a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreEmptyTimersTest.java +++ b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreEmptyTimersTest.java @@ -12,20 +12,16 @@ public class HazelcastTimerStoreEmptyTimersTest extends HazelcastTimerStoreTestB @Test public void emptyTimersShallResultInZeroTimersCountedForServer() { - String [] serverIds = new String[] { "a" }; - - String [] counts = callListTimers(timers, serverIds); + String [] counts = callListTimers(timers, "a"); assertEquals("With no timers defined, zero timers is expected for given server id", "0", counts[0]); } @Test public void emptyTimersShallResultInArrayOfTheSameSizeAsServerIds() { - String [] serverIds = new String[] { "a", "b", "c", "d" }; - - String [] counts = callListTimers(timers, serverIds); + String [] counts = callListTimers(timers, "a", "b", "c", "d"); - assertEquals("Size of counters array shall match the size of server ids array", serverIds.length, counts.length); + assertEquals("Size of counters array shall match the size of server ids array", 4, counts.length); } } diff --git a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTest.java b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTest.java index 3a9321c3020..1c598a81450 100644 --- a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTest.java +++ b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTest.java @@ -32,27 +32,21 @@ public void setUpTimers() { @Test public void twoTimersForTheSameMemberNameShallBeCountedForTheSameServerId() { - String [] serverIds = new String[] { "jb" }; - - String [] counts = callListTimers(timers, serverIds); + String [] counts = callListTimers(timers, "jb"); assertEquals("2", counts[0]); } @Test public void countOneTimer() { - String [] serverIds = new String[] { "hz" }; - - String [] counts = callListTimers(timers, serverIds); + String [] counts = callListTimers(timers, "hz"); assertEquals("1", counts[0]); } @Test public void noNullsExpectedInCountsForMissingTimers() { - String [] serverIds = new String[] { "jb", "ltd", "hz" }; - - String [] counts = callListTimers(timers, serverIds); + String [] counts = callListTimers(timers, "jb", "ltd", "hz"); for (String count : counts) { assertNotNull("Even for missing timers/server ids no null is expected but rather some representation of zero", count); @@ -61,9 +55,7 @@ public void noNullsExpectedInCountsForMissingTimers() { @Test public void countersShallFollowServerIdOrder() { - String [] serverIds = new String[] { "hz", "ltd", "jb" }; - - String [] counts = callListTimers(timers, serverIds); + String [] counts = callListTimers(timers, "hz", "ltd", "jb"); assertEquals("1", counts[0]); assertEquals("0", counts[1]); diff --git a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTestBase.java b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTestBase.java index 88782251b45..78d4ce68332 100644 --- a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTestBase.java +++ b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/test/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStoreTestBase.java @@ -3,7 +3,7 @@ import java.util.Collection; public abstract class HazelcastTimerStoreTestBase { - public String[] callListTimers(Collection timers, String[] serverIds) { + public String[] callListTimers(Collection timers, String... serverIds) { return HazelcastTimerStore.listTimers(timers, serverIds); } }