You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ja...@apache.org on 2015/10/05 19:05:18 UTC
incubator-geode git commit: [GEODE-338] Modified FDDUnitTest,
increased thread count and added logging on failure
Repository: incubator-geode
Updated Branches:
refs/heads/develop 1512677f7 -> 28101725c
[GEODE-338] Modified FDDUnitTest, increased thread count and added logging on failure
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/28101725
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/28101725
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/28101725
Branch: refs/heads/develop
Commit: 28101725c5e882eafd1592df31f552716e3effa2
Parents: 1512677
Author: Jason Huynh <jh...@pivotal.io>
Authored: Mon Oct 5 10:02:47 2015 -0700
Committer: Jason Huynh <jh...@pivotal.io>
Committed: Mon Oct 5 10:05:04 2015 -0700
----------------------------------------------------------------------
.../java/com/gemstone/gemfire/internal/FDDUnitTest.java | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/28101725/gemfire-core/src/test/java/com/gemstone/gemfire/internal/FDDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/FDDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/FDDUnitTest.java
index 9d3bcb9..7379c86 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/FDDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/FDDUnitTest.java
@@ -81,9 +81,10 @@ public class FDDUnitTest extends CacheTestCase {
}
}
try {
+ StringBuffer incaseOfFailure = new StringBuffer();
final int[] port = AvailablePortHelper.getRandomAvailableTCPPorts(3);
final int mcastPort = AvailablePortHelper.getRandomAvailableUDPPort();
- int numThreads = 10;
+ int numThreads = 30;
startCacheServer(vm0, port[0], mcastPort);
startCacheServer(vm1, port[1], mcastPort);
@@ -99,6 +100,7 @@ public class FDDUnitTest extends CacheTestCase {
doPuts(vm0, numThreads, "portfolios");
long endFDs = checkFD(vm0);
long numFDs = endFDs - startingFDs;
+ incaseOfFailure.append("NoSelectorPooling startFDs: " + startingFDs + " endFDs: " + endFDs + " diff:" + numFDs + " ");
// run test with selector pooling
setUseSelectorPooling(vm0, true);
@@ -106,7 +108,8 @@ public class FDDUnitTest extends CacheTestCase {
doPuts(vm0, numThreads, "portfolios");
long endFDsWithPooling = checkFD(vm0);
long numFDsWithPooling = endFDsWithPooling - startingFDsWithPooling;
- assertTrue(numFDsWithPooling < numFDs);
+ incaseOfFailure.append("SelectorPooling#1 startFDs: " + startingFDsWithPooling + " endFDs: " + endFDsWithPooling + " diff:" + numFDsWithPooling + " ");
+ assertTrue(incaseOfFailure.toString(), numFDsWithPooling < numFDs);
// run it again and see if the number still is below
startingFDsWithPooling = checkFD(vm0);
@@ -115,7 +118,8 @@ public class FDDUnitTest extends CacheTestCase {
numFDsWithPooling = endFDsWithPooling - startingFDsWithPooling;
// if you see these asserts failing, it could be that we are not using the
// selector pool
- assertTrue(numFDsWithPooling < numFDs);
+ incaseOfFailure.append("SelectorPooling#2 startFDs: " + startingFDsWithPooling + " endFDs: " + endFDsWithPooling + " diff:" + numFDsWithPooling + " ");
+ assertTrue(incaseOfFailure.toString(), numFDsWithPooling < numFDs);
} finally {
setUseSelectorPooling(vm0, true);
@@ -151,7 +155,7 @@ public class FDDUnitTest extends CacheTestCase {
for (int i = 0; i < numThreads; i++) {
executor.execute(new Runnable() {
public void run() {
- for (int i = 0; i < 20; i++) {
+ for (int i = 0; i < 10; i++) {
String myValue = "string" + i;
region.put("k" + i, myValue);
try {