summaryrefslogtreecommitdiff
path: root/jsr166-tests
diff options
context:
space:
mode:
authorPrzemyslaw Szczepaniak <pszczepaniak@google.com>2016-03-17 14:05:28 +0000
committerNarayan Kamath <narayan@google.com>2016-03-17 16:06:55 +0000
commit1dd90163bec6097c9e5cc9016cbd6d3f6d185e01 (patch)
tree9de49fca3aefefad7eb16566cade0534014f5fe5 /jsr166-tests
parenta070272beecae23c49421c9a04d712455d121e50 (diff)
Adjust ThreadPoolExecutorTest#testPoolSizeInvariants
Commit dfec9b5386ca028cc1468f3e2717120ab6274702 alters how ThreadPoolExecutor#setCorePoolSize behaves. This change fixes #testPoolSizeInvariants to take it into account. Bug: 27702221 (cherry picked from commit d943f38ce56cd5b3280359975722ec9270a050e7) Change-Id: I4cbc5f7d83a8d82e67ac8d539cc3df375e48cc8a
Diffstat (limited to 'jsr166-tests')
-rw-r--r--jsr166-tests/src/test/java/jsr166/ThreadPoolExecutorTest.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/jsr166-tests/src/test/java/jsr166/ThreadPoolExecutorTest.java b/jsr166-tests/src/test/java/jsr166/ThreadPoolExecutorTest.java
index 7fe26f4382..2546626e81 100644
--- a/jsr166-tests/src/test/java/jsr166/ThreadPoolExecutorTest.java
+++ b/jsr166-tests/src/test/java/jsr166/ThreadPoolExecutorTest.java
@@ -1371,9 +1371,14 @@ public class ThreadPoolExecutorTest extends JSR166TestCase {
assertEquals(s, p.getMaximumPoolSize());
try {
p.setCorePoolSize(s + 1);
- shouldThrow();
+ // android-changed: changeset dfec9b5386ca028cc1468f3e2717120ab6274702
+ // disables this check for compatibility reason.
+ // shouldThrow();
} catch (IllegalArgumentException success) {}
- assertEquals(s, p.getCorePoolSize());
+ // android-changed: changeset dfec9b5386ca028cc1468f3e2717120ab6274702
+ // disables maximumpoolsize check for compatibility reason.
+ // assertEquals(s, p.getCorePoolSize());
+ assertEquals(s + 1, p.getCorePoolSize());
assertEquals(s, p.getMaximumPoolSize());
}
}