ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/ScheduledExecutorSubclassTest.java
(Generate patch)

Comparing jsr166/src/test/tck/ScheduledExecutorSubclassTest.java (file contents):
Revision 1.63 by jsr166, Wed Dec 21 02:14:06 2016 UTC vs.
Revision 1.64 by jsr166, Wed Jan 4 06:09:58 2017 UTC

# Line 940 | Line 940 | public class ScheduledExecutorSubclassTe
940          final CountDownLatch latch = new CountDownLatch(1);
941          final ExecutorService e = new CustomExecutor(2);
942          try (PoolCleaner cleaner = cleaner(e)) {
943 <            List<Callable<String>> l = new ArrayList<Callable<String>>();
943 >            List<Callable<String>> l = new ArrayList<>();
944              l.add(latchAwaitingStringTask(latch));
945              l.add(null);
946              try {
# Line 957 | Line 957 | public class ScheduledExecutorSubclassTe
957      public void testInvokeAny4() throws Exception {
958          final ExecutorService e = new CustomExecutor(2);
959          try (PoolCleaner cleaner = cleaner(e)) {
960 <            List<Callable<String>> l = new ArrayList<Callable<String>>();
960 >            List<Callable<String>> l = new ArrayList<>();
961              l.add(new NPETask());
962              try {
963                  e.invokeAny(l);
# Line 974 | Line 974 | public class ScheduledExecutorSubclassTe
974      public void testInvokeAny5() throws Exception {
975          final ExecutorService e = new CustomExecutor(2);
976          try (PoolCleaner cleaner = cleaner(e)) {
977 <            List<Callable<String>> l = new ArrayList<Callable<String>>();
977 >            List<Callable<String>> l = new ArrayList<>();
978              l.add(new StringTask());
979              l.add(new StringTask());
980              String result = e.invokeAny(l);
# Line 1012 | Line 1012 | public class ScheduledExecutorSubclassTe
1012      public void testInvokeAll3() throws Exception {
1013          final ExecutorService e = new CustomExecutor(2);
1014          try (PoolCleaner cleaner = cleaner(e)) {
1015 <            List<Callable<String>> l = new ArrayList<Callable<String>>();
1015 >            List<Callable<String>> l = new ArrayList<>();
1016              l.add(new StringTask());
1017              l.add(null);
1018              try {
# Line 1028 | Line 1028 | public class ScheduledExecutorSubclassTe
1028      public void testInvokeAll4() throws Exception {
1029          final ExecutorService e = new CustomExecutor(2);
1030          try (PoolCleaner cleaner = cleaner(e)) {
1031 <            List<Callable<String>> l = new ArrayList<Callable<String>>();
1031 >            List<Callable<String>> l = new ArrayList<>();
1032              l.add(new NPETask());
1033              List<Future<String>> futures = e.invokeAll(l);
1034              assertEquals(1, futures.size());
# Line 1047 | Line 1047 | public class ScheduledExecutorSubclassTe
1047      public void testInvokeAll5() throws Exception {
1048          final ExecutorService e = new CustomExecutor(2);
1049          try (PoolCleaner cleaner = cleaner(e)) {
1050 <            List<Callable<String>> l = new ArrayList<Callable<String>>();
1050 >            List<Callable<String>> l = new ArrayList<>();
1051              l.add(new StringTask());
1052              l.add(new StringTask());
1053              List<Future<String>> futures = e.invokeAll(l);
# Line 1076 | Line 1076 | public class ScheduledExecutorSubclassTe
1076      public void testTimedInvokeAnyNullTimeUnit() throws Exception {
1077          final ExecutorService e = new CustomExecutor(2);
1078          try (PoolCleaner cleaner = cleaner(e)) {
1079 <            List<Callable<String>> l = new ArrayList<Callable<String>>();
1079 >            List<Callable<String>> l = new ArrayList<>();
1080              l.add(new StringTask());
1081              try {
1082                  e.invokeAny(l, MEDIUM_DELAY_MS, null);
# Line 1105 | Line 1105 | public class ScheduledExecutorSubclassTe
1105          CountDownLatch latch = new CountDownLatch(1);
1106          final ExecutorService e = new CustomExecutor(2);
1107          try (PoolCleaner cleaner = cleaner(e)) {
1108 <            List<Callable<String>> l = new ArrayList<Callable<String>>();
1108 >            List<Callable<String>> l = new ArrayList<>();
1109              l.add(latchAwaitingStringTask(latch));
1110              l.add(null);
1111              try {
# Line 1123 | Line 1123 | public class ScheduledExecutorSubclassTe
1123          final ExecutorService e = new CustomExecutor(2);
1124          try (PoolCleaner cleaner = cleaner(e)) {
1125              long startTime = System.nanoTime();
1126 <            List<Callable<String>> l = new ArrayList<Callable<String>>();
1126 >            List<Callable<String>> l = new ArrayList<>();
1127              l.add(new NPETask());
1128              try {
1129                  e.invokeAny(l, LONG_DELAY_MS, MILLISECONDS);
# Line 1142 | Line 1142 | public class ScheduledExecutorSubclassTe
1142          final ExecutorService e = new CustomExecutor(2);
1143          try (PoolCleaner cleaner = cleaner(e)) {
1144              long startTime = System.nanoTime();
1145 <            List<Callable<String>> l = new ArrayList<Callable<String>>();
1145 >            List<Callable<String>> l = new ArrayList<>();
1146              l.add(new StringTask());
1147              l.add(new StringTask());
1148              String result = e.invokeAny(l, LONG_DELAY_MS, MILLISECONDS);
# Line 1170 | Line 1170 | public class ScheduledExecutorSubclassTe
1170      public void testTimedInvokeAllNullTimeUnit() throws Exception {
1171          final ExecutorService e = new CustomExecutor(2);
1172          try (PoolCleaner cleaner = cleaner(e)) {
1173 <            List<Callable<String>> l = new ArrayList<Callable<String>>();
1173 >            List<Callable<String>> l = new ArrayList<>();
1174              l.add(new StringTask());
1175              try {
1176                  e.invokeAll(l, MEDIUM_DELAY_MS, null);
# Line 1196 | Line 1196 | public class ScheduledExecutorSubclassTe
1196      public void testTimedInvokeAll3() throws Exception {
1197          final ExecutorService e = new CustomExecutor(2);
1198          try (PoolCleaner cleaner = cleaner(e)) {
1199 <            List<Callable<String>> l = new ArrayList<Callable<String>>();
1199 >            List<Callable<String>> l = new ArrayList<>();
1200              l.add(new StringTask());
1201              l.add(null);
1202              try {
# Line 1212 | Line 1212 | public class ScheduledExecutorSubclassTe
1212      public void testTimedInvokeAll4() throws Exception {
1213          final ExecutorService e = new CustomExecutor(2);
1214          try (PoolCleaner cleaner = cleaner(e)) {
1215 <            List<Callable<String>> l = new ArrayList<Callable<String>>();
1215 >            List<Callable<String>> l = new ArrayList<>();
1216              l.add(new NPETask());
1217              List<Future<String>> futures =
1218                  e.invokeAll(l, MEDIUM_DELAY_MS, MILLISECONDS);
# Line 1232 | Line 1232 | public class ScheduledExecutorSubclassTe
1232      public void testTimedInvokeAll5() throws Exception {
1233          final ExecutorService e = new CustomExecutor(2);
1234          try (PoolCleaner cleaner = cleaner(e)) {
1235 <            List<Callable<String>> l = new ArrayList<Callable<String>>();
1235 >            List<Callable<String>> l = new ArrayList<>();
1236              l.add(new StringTask());
1237              l.add(new StringTask());
1238              List<Future<String>> futures =

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines