geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prhomb...@apache.org
Subject [geode] branch develop updated: GEODE-4743: Removed five dead classes.
Date Wed, 28 Feb 2018 17:37:36 GMT
This is an automated email from the ASF dual-hosted git repository.

prhomberg pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new 7980b1c  GEODE-4743: Removed five dead classes.
7980b1c is described below

commit 7980b1c4fa9fb5a233ed77706a7f5885516a86cc
Author: Patrick Rhomberg <prhomberg@pivotal.io>
AuthorDate: Wed Feb 28 09:37:33 2018 -0800

    GEODE-4743: Removed five dead classes.
    
    * Remove classes: DebuggerSupport, SingletonCallable, SingletonValue, StackTraceCollector, DebuggerUtils.
    * Remove commented-out code that mentions one of these classes
    * Remove commented-out code from surrounding area.
    * Remove test that has been ignored since 2008.
    * Remove SingletonValue from sanctioned serializables.
    * Update AnalyzeSerializablesJUnitTest for more meaningful failure.
---
 .../geode/internal/util/DebuggerSupport.java       |  62 ----
 .../geode/internal/util/SingletonCallable.java     |  82 ------
 .../apache/geode/internal/util/SingletonValue.java | 318 ---------------------
 .../geode/internal/util/StackTraceCollector.java   | 170 -----------
 .../sanctioned-geode-core-serializables.txt        |   1 -
 .../org/apache/geode/cache/query/BugJUnitTest.java |   7 -
 .../geode/cache/query/QueryServiceJUnitTest.java   |  28 --
 .../geode/cache/query/TypedIteratorJUnitTest.java  |   3 -
 .../functional/IndexPrimaryKeyUsageJUnitTest.java  |   1 -
 .../IndexUsageInNestedQueryJUnitTest.java          |   1 -
 .../cache/query/functional/MiscJUnitTest.java      |  14 -
 .../query/functional/NestedQueryJUnitTest.java     |   2 -
 .../internal/index/IndexMaintainceJUnitTest.java   |  32 +--
 .../geode/cache30/CacheListenerTestCase.java       |   3 -
 .../apache/geode/cache30/DiskRegionTestImpl.java   |  14 -
 .../geode/cache30/MultiVMRegionTestCase.java       |  11 -
 .../apache/geode/cache30/ReconnectDUnitTest.java   |  13 -
 .../org/apache/geode/cache30/RegionTestCase.java   | 206 -------------
 .../AnalyzeSerializablesJUnitTest.java             |   9 +-
 .../org/apache/geode/test/dunit/DebuggerUtils.java |  52 ----
 20 files changed, 9 insertions(+), 1020 deletions(-)

diff --git a/geode-core/src/main/java/org/apache/geode/internal/util/DebuggerSupport.java b/geode-core/src/main/java/org/apache/geode/internal/util/DebuggerSupport.java
deleted file mode 100644
index 12a48ba..0000000
--- a/geode-core/src/main/java/org/apache/geode/internal/util/DebuggerSupport.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.internal.util;
-
-import org.apache.logging.log4j.Logger;
-
-import org.apache.geode.internal.i18n.LocalizedStrings;
-import org.apache.geode.internal.logging.LogService;
-import org.apache.geode.internal.logging.log4j.LocalizedMessage;
-
-/**
- *
- *
- */
-public abstract class DebuggerSupport {
-  private static final Logger logger = LogService.getLogger();
-
-  /** Creates a new instance of DebuggerSupport */
-  private DebuggerSupport() {}
-
-  /** Debugger support */
-  public static void waitForJavaDebugger() {
-    waitForJavaDebugger(null);
-  }
-
-  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "IL_INFINITE_LOOP",
-      justification = "Endless loop is for debugging purposes.")
-  public static void waitForJavaDebugger(String extraLogMsg) {
-    boolean cont = false;
-    String msg = ":";
-    if (extraLogMsg != null)
-      msg += extraLogMsg;
-    logger.fatal(LocalizedMessage
-        .create(LocalizedStrings.DebuggerSupport_WAITING_FOR_DEBUGGER_TO_ATTACH_0, msg));
-    boolean interrupted = false;
-    while (!cont) { // set cont to true in debugger when ready to continue
-      try {
-        // SET BREAKPOINT HERE
-        Thread.sleep(1000);
-      } catch (InterruptedException e) {
-        interrupted = true;
-        // ...but keep going, waiting for debugger
-      }
-    } // while
-    if (interrupted) {
-      Thread.currentThread().interrupt();
-    }
-    logger.info(LocalizedMessage.create(LocalizedStrings.DebuggerSupport_DEBUGGER_CONTINUING));
-  }
-}
diff --git a/geode-core/src/main/java/org/apache/geode/internal/util/SingletonCallable.java b/geode-core/src/main/java/org/apache/geode/internal/util/SingletonCallable.java
deleted file mode 100644
index 92c646c..0000000
--- a/geode-core/src/main/java/org/apache/geode/internal/util/SingletonCallable.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.internal.util;
-
-import java.io.InterruptedIOException;
-import java.util.concurrent.Callable;
-
-/**
- * This class serializes execution of concurrent tasks. This is useful when we want only one thread
- * to perform an expensive operation such that if the operation fails, all other threads fail with
- * the same exception without having to perform the expensive operation.
- *
- *
- * @param <T> the type of return value
- */
-public class SingletonCallable<T> {
-  private Object lock = new Object();
-  private volatile boolean running = false;
-  private Exception ex = null;
-
-  public T runSerially(Callable<T> c) throws Exception {
-    T retval = null;
-    synchronized (lock) {
-      while (running) {
-        try {
-          lock.wait();
-          if (ex != null) {
-            throw ex;
-          }
-        } catch (InterruptedException e) {
-          Thread.currentThread().interrupt();
-          throw new InterruptedIOException();
-        }
-      }
-      ex = null;
-      running = true;
-    }
-
-    Exception exception = null;
-    try {
-      retval = c.call();
-    } catch (Exception e) {
-      exception = e;
-    } finally {
-      synchronized (lock) {
-        if (exception != null && !ignoreException(exception)) {
-          ex = exception;
-        }
-        running = false;
-        lock.notifyAll();
-      }
-    }
-
-    if (exception != null) {
-      throw exception;
-    }
-    return retval;
-  }
-
-  /**
-   * Override this method for handling exception encountered while running the Callable c.
-   *
-   * @return false if we want the waiting threads to fail immediately<br/>
-   *         true if we want the waiting threads to invoke the callable
-   *
-   */
-  public boolean ignoreException(Exception e) {
-    return false;
-  }
-}
diff --git a/geode-core/src/main/java/org/apache/geode/internal/util/SingletonValue.java b/geode-core/src/main/java/org/apache/geode/internal/util/SingletonValue.java
deleted file mode 100644
index 4132b2b..0000000
--- a/geode-core/src/main/java/org/apache/geode/internal/util/SingletonValue.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.internal.util;
-
-import java.io.Closeable;
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.util.concurrent.locks.Condition;
-import java.util.concurrent.locks.ReentrantLock;
-
-/**
- * A builder that caches the singleton value.
- *
- * The result is created and cached by the first thread that invokes the underlying
- * {@code Callable}. Concurrent requests will block and be notified once the originating request has
- * completed. Once the result has been cached, all subsequent invocations will return the cached
- * result until it has been cleared. When the value type acquires resources, it is recommended that
- * the type implement {@link Closeable}. This will allow the resources to be freed if a temporary
- * value is created by a concurrent clear operation. In all other cases the user is responsible for
- * clearing an resources held by the cached value.
- * <p>
- * The caching technique is most useful as a defense against a call that is invoked by multiple
- * threads but executes blocking operations serially. Even when the call supports timeouts, the
- * serial execution penalty can cause "timeout stacking" and thus unbounded delays on the invoking
- * threads.
- *
- *
- * @param <T> the type of the singleton
- */
-public class SingletonValue<T extends Closeable> {
-  /**
-   * Constructs a singleton value.
-   *
-   * @param <T> the value type
-   */
-  public interface SingletonBuilder<T extends Closeable> {
-    /**
-     * Constructs the value.
-     *
-     * @return the value
-     * @throws IOException unable to construct the value
-     */
-    T create() throws IOException;
-
-    /**
-     * Invoked after the value is successfully created and stored.
-     */
-    void postCreate();
-
-    /**
-     * Invoked when a thread is waiting for the result of {@link #create}.
-     */
-    void createInProgress();
-  }
-
-  /**
-   * Defines the value state. Allowable transitions are:
-   * <ul>
-   * <li>{@code NOT_SET} -> {@code IN_PROGRESS}
-   * <li>{@code IN_PROGRESS} -> {@code NOT_SET}, {@code SET}, {@code CLEARED}
-   * <li>{@code SET} -> {@code NOT_SET}, {@code CLEARED}
-   * </ul>
-   */
-  private enum ValueState {
-    NOT_SET, IN_PROGRESS, SET, CLEARED
-  }
-
-  /** the delegated invocation */
-  private final SingletonBuilder<T> builder;
-
-  /** protects access to {@code state} and {@code value} */
-  private final ReentrantLock sync;
-
-  /** notified during state change */
-  private final Condition change;
-
-  /** the state of the cached value */
-  private ValueState state;
-
-  /** the originating thread, temporarily used during invocation */
-  private Thread current;
-
-  /** the cached value, null when not or cleared */
-  private T value;
-
-  /** the invocation error, null if successful or cleared */
-  private IOException error;
-
-  public SingletonValue(SingletonBuilder<T> builder) {
-    this.builder = builder;
-
-    state = ValueState.NOT_SET;
-    sync = new ReentrantLock();
-    change = sync.newCondition();
-  }
-
-  /**
-   * Returns true if the value is cached.
-   *
-   * @return true if cached
-   */
-  public boolean hasCachedValue() {
-    sync.lock();
-    try {
-      return state == ValueState.SET;
-    } finally {
-      sync.unlock();
-    }
-  }
-
-  /**
-   * Returns true if the value is cached.
-   *
-   * @return true if cached
-   */
-  public boolean isCleared() {
-    sync.lock();
-    try {
-      return state == ValueState.CLEARED;
-    } finally {
-      sync.unlock();
-    }
-  }
-
-  /**
-   * Returns the cached result, or null if the value is not cached.
-   *
-   * @return the cached result
-   */
-  public T getCachedValue() {
-    sync.lock();
-    try {
-      return value;
-    } finally {
-      sync.unlock();
-    }
-  }
-
-  /**
-   * Clears the cached result. Any threads waiting for the result will retry unless
-   * {@code allowReset} is {@code false}.
-   *
-   * @param allowReset true if the value is allowed to be cached subsequently
-   * @return the old value, or null if not set.
-   */
-  public T clear(boolean allowReset) {
-    sync.lock();
-    try {
-      // nothing to do
-      if (state == ValueState.NOT_SET) {
-        return null;
-      }
-
-      T result = value;
-      ValueState old = state;
-
-      // reset internal state
-      state = allowReset ? ValueState.NOT_SET : ValueState.CLEARED;
-      current = null;
-      value = null;
-      error = null;
-
-      // interrupt waiting threads
-      if (old == ValueState.IN_PROGRESS) {
-        change.signalAll();
-      }
-      return result;
-    } finally {
-      sync.unlock();
-    }
-  }
-
-  /**
-   * Clears the cached value as long it matches the expected value.
-   *
-   * @param expect the expected value
-   * @param allowReset true if the value is allowed be be cached subsequently
-   * @return true if the value was cleared
-   */
-  public boolean clear(T expect, boolean allowReset) {
-    sync.lock();
-    try {
-      if (expect != value) {
-        return false;
-      }
-
-      ValueState prev = state;
-      clear(allowReset);
-      return prev == ValueState.SET;
-
-    } finally {
-      sync.unlock();
-    }
-  }
-
-  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "UL_UNRELEASED_LOCK",
-      justification = "findbugs is wrong and Darrel agrees")
-  public T get() throws IOException {
-    assert sync.getHoldCount() == 0;
-
-    sync.lock();
-    boolean doUnlock = true;
-    try {
-      switch (state) {
-        case NOT_SET:
-          assert current == null;
-          current = Thread.currentThread();
-          state = ValueState.IN_PROGRESS;
-
-          doUnlock = false;
-          sync.unlock();
-
-          // invoke the task while NOT locked
-          return acquireValue();
-
-        case IN_PROGRESS:
-          builder.createInProgress();
-          while (state == ValueState.IN_PROGRESS) {
-            try {
-              change.await();
-            } catch (InterruptedException e) {
-              Thread.currentThread().interrupt();
-              throw new InterruptedIOException();
-            }
-          }
-
-          if (error != null) {
-            throw error;
-          }
-
-          doUnlock = false;
-          sync.unlock();
-
-          // try again
-          return get();
-
-        case SET:
-          return value;
-
-        case CLEARED:
-          throw new IOException("Value has been cleared and cannot be reset");
-
-        default:
-          throw new IllegalStateException("Unknown ValueState: " + state);
-      }
-    } finally {
-      if (doUnlock) {
-        sync.unlock();
-      }
-    }
-  }
-
-  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "UL_UNRELEASED_LOCK",
-      justification = "findbugs is wrong and Darrel agrees")
-  private T acquireValue() throws IOException {
-    T result = null;
-    IOException err = null;
-    try {
-      // only one thread invokes this at a time (except possibly during a concurrent clear)
-      result = builder.create();
-    } catch (IOException e) {
-      err = e;
-    }
-
-    // update the state and signal waiting threads
-    sync.lock();
-    boolean doUnlock = true;
-    try {
-      if (state != ValueState.IN_PROGRESS || current != Thread.currentThread()) {
-        // oops, we got cleared and need to clean up the tmp value
-        if (result != null) {
-          try {
-            result.close();
-          } catch (IOException e) {
-          }
-        }
-
-        sync.unlock();
-        doUnlock = false;
-
-        return get();
-      }
-
-      state = (err == null) ? ValueState.SET : ValueState.NOT_SET;
-      current = null;
-      value = result;
-      error = err;
-
-      try {
-        builder.postCreate();
-      } finally {
-        change.signalAll();
-      }
-    } finally {
-      if (doUnlock) {
-        sync.unlock();
-      }
-    }
-
-    // all done, return the result
-    if (err != null) {
-      throw err;
-    }
-    return result;
-  }
-}
diff --git a/geode-core/src/main/java/org/apache/geode/internal/util/StackTraceCollector.java b/geode-core/src/main/java/org/apache/geode/internal/util/StackTraceCollector.java
deleted file mode 100644
index 4d89faa..0000000
--- a/geode-core/src/main/java/org/apache/geode/internal/util/StackTraceCollector.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.internal.util;
-
-import java.io.ByteArrayOutputStream;
-import java.io.PrintWriter;
-import java.util.Collections;
-import java.util.Set;
-import java.util.concurrent.ConcurrentSkipListSet;
-
-/**
- * Collects unique stack traces for later examination. This works best and is most useful when
- * traces are added at the same point of origin. This will collect all unique code paths while the
- * collector is turned on. This class will affect timing and performance so its use is suspect while
- * diagnosing concurrency issues.
- *
- * Example: <code>
- * public void doSomeWork() {
- *      // This will collect all unique code paths to this method.
- *      this.traceCollector.add(new Exception())
- * }
- * </code>
- *
- *
- * @since Geode 1.0
- */
-public class StackTraceCollector {
-  /**
-   * Maximum stack trace size.
-   */
-  private static int MAX_TRACE_SIZE = 128 * 1024;
-
-  /**
-   * Contains unique stack traces.
-   */
-  private Set<String> stackTraceSet = new ConcurrentSkipListSet<String>();
-
-  /**
-   * The {@link StackTraceCollector#add(Throwable)} method will do no work when this is false.
-   */
-  private volatile boolean on = true;
-
-  /**
-   * Contains converted stack traces (Throwable -> String).
-   */
-  private ByteArrayOutputStream ostream = new ByteArrayOutputStream(MAX_TRACE_SIZE);
-
-  /**
-   * Used to convert stack traces (Throwable -> String).
-   */
-  private PrintWriter writer = new PrintWriter(this.ostream);
-
-  /**
-   * Returns true if this collector is on.
-   */
-  public boolean isOn() {
-    return this.on;
-  }
-
-  /**
-   * Returns true if this collector is off.
-   */
-  public boolean isOff() {
-    return !isOn();
-  }
-
-  /**
-   * Turns this collector on.
-   */
-  public void on() {
-    this.on = true;
-  }
-
-  /**
-   * Turns this collector off.
-   */
-  public void off() {
-    this.on = false;
-  }
-
-  /**
-   * Adds a stack trace to this collector if it is unique.
-   *
-   * @param throwable used to generate the stack trace.
-   * @return true if the stack trace was not already present in this collector. This will always
-   *         return false if the collector is turned off.
-   */
-  public boolean add(final Throwable throwable) {
-    return add(this.stackTraceSet, throwable);
-  }
-
-  /**
-   * Adds a stack trace to a collection Set if it is unique.
-   *
-   * @param throwable used to generate the stack trace.
-   * @return true if the stack trace was not already present in this collector. This will always
-   *         return false if the collector is turned off.
-   */
-  protected synchronized boolean add(Set<String> stackTraceSet, final Throwable throwable) {
-    if (this.on) {
-      String trace = convert(throwable);
-      return stackTraceSet.add(trace);
-    }
-
-    return false;
-  }
-
-  /**
-   * Clears this collector of all stack traces.
-   *
-   * @return true if there were stack traces to clear.
-   */
-  public boolean clear() {
-    boolean value = (this.stackTraceSet.size() > 0);
-    this.stackTraceSet.clear();
-
-    return value;
-  }
-
-  /**
-   * Returns true if the throwable parameter is contained by this collector.
-   *
-   * @param throwable a stack trace to check.
-   */
-  public boolean contains(final Throwable throwable) {
-    return contains(convert(throwable));
-  }
-
-  /**
-   * Returns true if the stackTrace parameter is contained by this collector.
-   *
-   * @param stackTrace a stack trace.
-   */
-  public boolean contains(final String stackTrace) {
-    return this.stackTraceSet.contains(stackTrace);
-  }
-
-  /**
-   * Returns the stack trace associated with a Throwable as a String.
-   *
-   * @param throwable contains a stack trace to be extracted and returned.
-   */
-  public synchronized String convert(final Throwable throwable) {
-    throwable.printStackTrace(this.writer);
-    this.writer.flush();
-    String stackTrace = this.ostream.toString();
-    this.ostream.reset();
-
-    return stackTrace;
-  }
-
-  /**
-   * Returns an unmodifiable Set of the unique stack traces contained by this collector.
-   */
-  public Set<String> view() {
-    return Collections.unmodifiableSet(this.stackTraceSet);
-  }
-}
diff --git a/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-core-serializables.txt b/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-core-serializables.txt
index 8e148e1..e7e00b2 100644
--- a/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-core-serializables.txt
+++ b/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-core-serializables.txt
@@ -441,7 +441,6 @@ org/apache/geode/internal/tcp/ImmutableByteBufferInputStream,false
 org/apache/geode/internal/tcp/MemberShunnedException,true,-8453126202477831557,member:org/apache/geode/distributed/DistributedMember
 org/apache/geode/internal/tcp/ReenteredConnectException,true,2878977454669428469
 org/apache/geode/internal/util/Breadcrumbs$CrumbType,false
-org/apache/geode/internal/util/SingletonValue$ValueState,false
 org/apache/geode/internal/util/SunAPINotFoundException,true,75895915344106684
 org/apache/geode/internal/util/concurrent/CopyOnWriteHashMap,false,map:java/util/Map
 org/apache/geode/internal/util/concurrent/CustomEntryConcurrentHashMap,true,-7056732555635108300,compareValues:boolean,entryCreator:org/apache/geode/internal/util/concurrent/CustomEntryConcurrentHashMap$HashEntryCreator,segmentMask:int,segmentShift:int,segments:org/apache/geode/internal/util/concurrent/CustomEntryConcurrentHashMap$Segment[]
diff --git a/geode-core/src/test/java/org/apache/geode/cache/query/BugJUnitTest.java b/geode-core/src/test/java/org/apache/geode/cache/query/BugJUnitTest.java
index 2fc8270..a8b13dd 100644
--- a/geode-core/src/test/java/org/apache/geode/cache/query/BugJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache/query/BugJUnitTest.java
@@ -146,7 +146,6 @@ public class BugJUnitTest {
     queryStr = "import org.apache.geode.cache.\"query\".data.Portfolio; "
         + "select distinct * from /pos, (select distinct * from /pos p TYPE Portfolio, p.positions where value!=null)";
     q = qs.newQuery(queryStr);
-    // DebuggerSupport.waitForJavaDebugger(cache.getLogger());
     r = q.execute();
   }
 
@@ -165,7 +164,6 @@ public class BugJUnitTest {
     // iterator def, but now succeeds because there is only one untyped iterator
     queryStr = "Select distinct ID from /pos";
     q = qs.newQuery(queryStr);
-    // DebuggerSupport.waitForJavaDebugger(cache.getLogger());
     r = q.execute();
     Set expectedSet = createAndPopulateSet(4);
     assertEquals(expectedSet, ((SelectResults) r).asSet());
@@ -206,7 +204,6 @@ public class BugJUnitTest {
     }
 
     // the following queries, however, should work:
-    // DebuggerSupport.waitForJavaDebugger(cache.getLogger());
     queryStr = "Select distinct e.value.secId from /pos, getPositions(23) e";
     q = qs.newQuery(queryStr);
     r = q.execute();
@@ -216,14 +213,12 @@ public class BugJUnitTest {
     queryStr = "import org.apache.geode.cache.\"query\".data.Position;"
         + "select distinct value.secId from /pos, (map<string, Position>)getPositions(23)";
     q = qs.newQuery(queryStr);
-    // DebuggerSupport.waitForJavaDebugger(cache.getLogger());
     r = q.execute();
     CacheUtils.getLogger().fine(queryStr);
     CacheUtils.getLogger().fine(Utils.printResult(r));
 
     queryStr = "import java.util.Map$Entry as Entry;"
         + "select distinct value.secId from /pos, getPositions(23) type Entry";
-    // DebuggerSupport.waitForJavaDebugger(cache.getLogger());
     q = qs.newQuery(queryStr);
     r = q.execute();
     CacheUtils.getLogger().fine(queryStr);
@@ -234,7 +229,6 @@ public class BugJUnitTest {
   @Test
   public void testBug32624() throws Exception {
     this.qs.createIndex("iIndex", IndexType.FUNCTIONAL, "e.value.status", "/pos.entries e");
-    // DebuggerSupport.waitForJavaDebugger(CacheUtils.getLogger());
     this.region.put("0", new Portfolio(0));
   }
 
@@ -288,7 +282,6 @@ public class BugJUnitTest {
     try {
       q = CacheUtils.getQueryService().newQuery(queries);
       CacheUtils.getLogger().info("Executing query: " + queries);
-      // DebuggerSupport.waitForJavaDebugger(CacheUtils.getLogger());
       SelectResults rs = (SelectResults) q.execute();
       assertTrue("Resultset size should be > 0", rs.size() > 0);
     } catch (Exception e) {
diff --git a/geode-core/src/test/java/org/apache/geode/cache/query/QueryServiceJUnitTest.java b/geode-core/src/test/java/org/apache/geode/cache/query/QueryServiceJUnitTest.java
index 45658fb..a420331 100644
--- a/geode-core/src/test/java/org/apache/geode/cache/query/QueryServiceJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache/query/QueryServiceJUnitTest.java
@@ -122,7 +122,6 @@ public class QueryServiceJUnitTest {
   public void testCreateIndex() throws Exception {
     CacheUtils.log("testCreateIndex");
     QueryService qs = CacheUtils.getQueryService();
-    // DebuggerSupport.waitForJavaDebugger(CacheUtils.getLogger());
     Index index = qs.createIndex("statusIndex", IndexType.FUNCTIONAL, "status", "/Portfolios");
 
     try {
@@ -170,13 +169,10 @@ public class QueryServiceJUnitTest {
     QueryService qs = CacheUtils.getQueryService();
     qs.removeIndexes();
     for (int i = 0; i < testData.length; i++) {
-      // CacheUtils.log("indexExpr="+testData[i][0]+" from="+testData[i][1]);
       Index index = null;
       try {
         String indexedExpr = (String) testData[i][0];
         String fromClause = (String) testData[i][1];
-        // if (indexedExpr.equals("status") && i == 7)
-        // DebuggerSupport.waitForJavaDebugger(CacheUtils.getLogger());
         index = qs.createIndex("index" + i, IndexType.FUNCTIONAL, indexedExpr, fromClause);
         if (testData[i][2] == Boolean.TRUE && index == null) {
           fail("QueryService.createIndex unable to  create index for indexExpr=" + testData[i][0]
@@ -186,10 +182,7 @@ public class QueryServiceJUnitTest {
               "QueryService.createIndex allows to create index for un-supported index definition (indexExpr="
                   + testData[i][0] + " from=" + testData[i][1] + ")");
         }
-        // CacheUtils.log((index == null ? "" : index.toString()));
       } catch (Exception e) {
-        // e.printStackTrace();
-        // CacheUtils.log("NOT ALLOWDED "+e);
         if (testData[i][2] == Boolean.TRUE) {
           e.printStackTrace();
           fail("QueryService.createIndex unable to  create index for indexExpr=" + testData[i][0]
@@ -199,7 +192,6 @@ public class QueryServiceJUnitTest {
         if (index != null)
           qs.removeIndex(index);
       }
-      // CacheUtils.log("");
     }
   }
 
@@ -232,26 +224,6 @@ public class QueryServiceJUnitTest {
     qs.removeIndex(index);
   }
 
-
-  // no longer support getting indexes by fromClause, type, and indexedExpression, so this commented
-  // out
-  // private void runGetIndexTests(Object testData[][]){
-  // for(int i=0;i<testData.length;i++){
-  // try{
-  // Index index =
-  // CacheUtils.getQueryService().getIndex((String)testData[i][1],IndexType.FUNCTIONAL,(String)testData[i][0]);
-  // if(testData[i][2] == Boolean.TRUE && index == null){
-  // fail("QueryService.getIndex unable to find index for indexExpr="+testData[i][0]+"
-  // from="+testData[i][1]);
-  // }else if(testData[i][2] == Boolean.FALSE && index != null){
-  // fail("QueryService.getIndex return non-matching index for indexExpr="+testData[i][0]+"
-  // from="+testData[i][1]);
-  // }
-  // }catch(Exception e){
-  // }
-  // }
-  // }
-
   @Test
   public void testRemoveIndex() throws Exception {
     CacheUtils.log("testRemoveIndex");
diff --git a/geode-core/src/test/java/org/apache/geode/cache/query/TypedIteratorJUnitTest.java b/geode-core/src/test/java/org/apache/geode/cache/query/TypedIteratorJUnitTest.java
index 0e3de99..1f6a2b7 100644
--- a/geode-core/src/test/java/org/apache/geode/cache/query/TypedIteratorJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache/query/TypedIteratorJUnitTest.java
@@ -79,13 +79,11 @@ public class TypedIteratorJUnitTest {
     Query q = this.qs.newQuery( // must quote "query" because it is a reserved word
         "IMPORT org.apache.geode.cache.\"query\".data.Portfolio;\n" + "SELECT DISTINCT *\n"
             + "FROM (collection<Portfolio>)/pos\n" + "WHERE ID = 3  ");
-    // org.apache.geode.internal.util.DebuggerSupport.waitForJavaDebugger(this.cache.getLogger());
     Object r = q.execute();
 
     q = this.qs.newQuery( // must quote "query" because it is a reserved word
         "IMPORT org.apache.geode.cache.\"query\".data.Position;\n" + "SELECT DISTINCT *\n"
             + "FROM /pos p, (collection<Position>)p.positions.values\n" + "WHERE secId = 'IBM'");
-    // org.apache.geode.internal.util.DebuggerSupport.waitForJavaDebugger(this.cache.getLogger());
     r = q.execute();
   }
 
@@ -94,7 +92,6 @@ public class TypedIteratorJUnitTest {
     CacheUtils.startCache();
     cache = CacheUtils.getCache();
     AttributesFactory attributesFactory = new AttributesFactory();
-    // attributesFactory.setValueConstraint(Portfolio.class);
     RegionAttributes regionAttributes = attributesFactory.create();
 
     region = cache.createRegion("pos", regionAttributes);
diff --git a/geode-core/src/test/java/org/apache/geode/cache/query/functional/IndexPrimaryKeyUsageJUnitTest.java b/geode-core/src/test/java/org/apache/geode/cache/query/functional/IndexPrimaryKeyUsageJUnitTest.java
index b2b12f7..f7bfee6 100755
--- a/geode-core/src/test/java/org/apache/geode/cache/query/functional/IndexPrimaryKeyUsageJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache/query/functional/IndexPrimaryKeyUsageJUnitTest.java
@@ -84,7 +84,6 @@ public class IndexPrimaryKeyUsageJUnitTest {
         QueryObserverHolder.setInstance(observer);
         q = CacheUtils.getQueryService().newQuery(queries[i]);
         CacheUtils.getLogger().info("Executing query: " + queries[i]);
-        // DebuggerSupport.waitForJavaDebugger(CacheUtils.getLogger());
         r[i][0] = (SelectResults) q.execute();
         if (!observer.isIndexesUsed) {
           CacheUtils.log("NO INDEX USED");
diff --git a/geode-core/src/test/java/org/apache/geode/cache/query/functional/IndexUsageInNestedQueryJUnitTest.java b/geode-core/src/test/java/org/apache/geode/cache/query/functional/IndexUsageInNestedQueryJUnitTest.java
index e3e061e..d2fc9e3 100755
--- a/geode-core/src/test/java/org/apache/geode/cache/query/functional/IndexUsageInNestedQueryJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache/query/functional/IndexUsageInNestedQueryJUnitTest.java
@@ -93,7 +93,6 @@ public class IndexUsageInNestedQueryJUnitTest {
         QueryObserverHolder.setInstance(observer);
         q = CacheUtils.getQueryService().newQuery(queries[i]);
         CacheUtils.getLogger().info("Executing query: " + queries[i]);
-        // DebuggerSupport.waitForJavaDebugger(CacheUtils.getLogger());
         r[i][0] = (SelectResults) q.execute();
         if (!observer.isIndexesUsed) {
           CacheUtils.log("NO INDEX USED");
diff --git a/geode-core/src/test/java/org/apache/geode/cache/query/functional/MiscJUnitTest.java b/geode-core/src/test/java/org/apache/geode/cache/query/functional/MiscJUnitTest.java
index 6615dea..a58ce19 100644
--- a/geode-core/src/test/java/org/apache/geode/cache/query/functional/MiscJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache/query/functional/MiscJUnitTest.java
@@ -73,7 +73,6 @@ public class MiscJUnitTest {
     region.put("3", new Portfolio(3));
     Query query = CacheUtils.getQueryService().newQuery(
         "SELECT DISTINCT * FROM (SELECT DISTINCT * FROM /Portfolios where status = 'active') p  where p.ID = 0");
-    // DebuggerSupport.waitForJavaDebugger(CacheUtils.getLogger());
     Collection result = (Collection) query.execute();
     Portfolio p = (Portfolio) (result.iterator().next());
     if (!p.status.equals("active") || p.getID() != 0)
@@ -94,19 +93,6 @@ public class MiscJUnitTest {
     Portfolio p = (Portfolio) (result.iterator().next());
     if (!p.positions.containsKey("IBM"))
       fail(query.getQueryString());
-    // query = CacheUtils.getQueryService().newQuery("SELECT DISTINCT * FROM
-    // /Portfolios where status = ELEMENT(SELECT DISTINCT * FROM /Portfolios p
-    // where p.ID = 0).status");
-    // result = (Collection)query.execute();
-    // CacheUtils.log(result);
-    // query = CacheUtils.getQueryService().newQuery("SELECT DISTINCT * FROM
-    // /Portfolios x where status = ELEMENT(SELECT DISTINCT * FROM /Portfolios
-    // p where p.ID = x.ID).status");
-    // result = (Collection)query.execute();
-    // SELECT DISTINCT * FROM /Portfolios where status = ELEMENT(SELECT
-    // DISTINCT * FROM /Portfolios where ID = 0).status
-    // SELECT DISTINCT * FROM /Portfolios x where status = ELEMENT(SELECT
-    // DISTINCT * FROM /Portfolios p where p.ID = x.ID).status
   }
 
   @Ignore("TODO: test is disabled")
diff --git a/geode-core/src/test/java/org/apache/geode/cache/query/functional/NestedQueryJUnitTest.java b/geode-core/src/test/java/org/apache/geode/cache/query/functional/NestedQueryJUnitTest.java
index cf58b40..f48f581 100644
--- a/geode-core/src/test/java/org/apache/geode/cache/query/functional/NestedQueryJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache/query/functional/NestedQueryJUnitTest.java
@@ -268,7 +268,6 @@ public class NestedQueryJUnitTest {
       try {
         q = CacheUtils.getQueryService().newQuery(queries[i]);
         CacheUtils.getLogger().info("Executing query: " + queries[i]);
-        // DebuggerSupport.waitForJavaDebugger(CacheUtils.getLogger());
         r[i][0] = (SelectResults) q.execute();
         QueryObserverImpl observer = new QueryObserverImpl();
         QueryObserverHolder.setInstance(observer);
@@ -276,7 +275,6 @@ public class NestedQueryJUnitTest {
         resType1 = (r[i][0]).getCollectionType().getElementType();
         resSize1 = ((r[i][0]).size());
         set1 = ((r[i][0]).asSet());
-        // Iterator iter=set1.iterator();
 
       } catch (Exception e) {
         throw new AssertionError(e);
diff --git a/geode-core/src/test/java/org/apache/geode/cache/query/internal/index/IndexMaintainceJUnitTest.java b/geode-core/src/test/java/org/apache/geode/cache/query/internal/index/IndexMaintainceJUnitTest.java
index fd7fa6e..8c3ba0d 100644
--- a/geode-core/src/test/java/org/apache/geode/cache/query/internal/index/IndexMaintainceJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache/query/internal/index/IndexMaintainceJUnitTest.java
@@ -185,46 +185,19 @@ public class IndexMaintainceJUnitTest {
     CacheUtils.log(((CompactRangeIndex) index).dump());
     IndexStatistics stats = index.getStatistics();
     assertEquals(4, stats.getNumberOfValues());
-    // org.apache.geode.internal.util.
-    // DebuggerSupport.waitForJavaDebugger(region.getCache().getLogger());
     region.put("4", new Portfolio(4));
     CacheUtils.log(((CompactRangeIndex) index).dump());
     stats = index.getStatistics();
     assertEquals(5, stats.getNumberOfValues());
-    // Set results = new HashSet();
-    // index.query("active", OQLLexerTokenTypes.TOK_EQ, results, new ExecutionContext(null,
-    // CacheUtils.getCache()));
     SelectResults results = region.query("status = 'active'");
     assertEquals(3, results.size());
   }
 
-  // !!!:ezoerner:20081030 disabled because modifying an object in place
-  // and then putting it back into the cache breaks a CompactRangeIndex.
-  // @todo file a ticket on this issue
-  @Ignore
-  @Test
-  public void test002UpdateEntry() throws Exception {
-    IndexStatistics stats = index.getStatistics();
-    CacheUtils.log(((CompactRangeIndex) index).dump());
-    Portfolio p = (Portfolio) region.get("4");
-    p.status = "inactive";
-    region.put("4", p);
-    assertEquals(5, stats.getNumberOfValues());
-    // Set results = new HashSet();
-    // index.query("active", OQLLexerTokenTypes.TOK_EQ, results,new ExecutionContext(null,
-    // CacheUtils.getCache()));
-    SelectResults results = region.query("status = 'active'");
-    assertEquals(2, results.size());
-  }
-
   @Test
   public void test003InvalidateEntry() throws Exception {
     IndexStatistics stats = index.getStatistics();
     region.invalidate("4");
     assertEquals(4, stats.getNumberOfValues());
-    // Set results = new HashSet();
-    // index.query("active", OQLLexerTokenTypes.TOK_EQ, results,new ExecutionContext(null,
-    // CacheUtils.getCache()));
     SelectResults results = region.query("status = 'active'");
     assertEquals(2, results.size());
   }
@@ -235,15 +208,12 @@ public class IndexMaintainceJUnitTest {
     region.put("4", new Portfolio(4));
     region.destroy("4");
     assertEquals(4, stats.getNumberOfValues());
-    // Set results = new HashSet();
-    // index.query("active", OQLLexerTokenTypes.TOK_EQ, results,new ExecutionContext(null,
-    // CacheUtils.getCache()));
     SelectResults results = region.query("status = 'active'");
     assertEquals(2, results.size());
   }
 
   // This test has a meaning only for Trunk code as it checks for Map implementation
-  // Asif : Tests for Region clear operations on Index in a Local VM
+  // Tests for Region clear operations on Index in a Local VM
   @Test
   public void test005IndexClearanceOnMapClear() {
     try {
diff --git a/geode-core/src/test/java/org/apache/geode/cache30/CacheListenerTestCase.java b/geode-core/src/test/java/org/apache/geode/cache30/CacheListenerTestCase.java
index eadba1a..b645183 100644
--- a/geode-core/src/test/java/org/apache/geode/cache30/CacheListenerTestCase.java
+++ b/geode-core/src/test/java/org/apache/geode/cache30/CacheListenerTestCase.java
@@ -345,7 +345,6 @@ public abstract class CacheListenerTestCase extends CacheLoaderTestCase {
 
     region = createRegion(name, attrs);
     assertTrue(region.getAttributes().getCacheListener() != null);
-    // org.apache.geode.internal.util.DebuggerSupport.waitForJavaDebugger(getLogWriter());
     region.destroyRegion();
     Wait.pause(100); // extra pause
     assertTrue(region.isDestroyed());
@@ -367,8 +366,6 @@ public abstract class CacheListenerTestCase extends CacheLoaderTestCase {
   public void testCacheListenerAfterRegionInvalidate() throws CacheException, InterruptedException {
 
     final String name = this.getUniqueName();
-    // Object arg = "ARG";
-    // final String exception = "EXCEPTION";
 
     TestCacheListener listener = new TestCacheListener() {
       private boolean closed = false;
diff --git a/geode-core/src/test/java/org/apache/geode/cache30/DiskRegionTestImpl.java b/geode-core/src/test/java/org/apache/geode/cache30/DiskRegionTestImpl.java
index 6fefb55..d29dfec 100644
--- a/geode-core/src/test/java/org/apache/geode/cache30/DiskRegionTestImpl.java
+++ b/geode-core/src/test/java/org/apache/geode/cache30/DiskRegionTestImpl.java
@@ -135,19 +135,6 @@ public class DiskRegionTestImpl implements Serializable {
       }
     });
 
-    // vm2.invoke(new CacheSerializableRunnable("Create mirrored KEYS region in VM2") {
-    // public void run2() throws CacheException {
-    // AttributesFactory factory = new AttributesFactory();
-    // // set scope to be same as test region
-    // Scope scope = DiskRegionTestImpl.this.rtc.getRegionAttributes().getScope();
-    // factory.setScope(scope);
-    // // set mirror KEYS
-    // factory.setMirrorType(MirrorType.KEYS);
-    // RegionAttributes attrs2 = factory.create();
-    // Region rgn = DiskRegionTestImpl.this.rtc.createRegion(name, attrs2);
-    // }
-    // });
-
     String runnableName =
         "Re-create backup region in VM0 with mirror " + "KEYS_VALUES and Do Verification";
     vm0.invoke(new CacheSerializableRunnable(runnableName) {
@@ -156,7 +143,6 @@ public class DiskRegionTestImpl implements Serializable {
             new AttributesFactory(DiskRegionTestImpl.this.rtc.getRegionAttributes());
         factory.setDataPolicy(DataPolicy.PERSISTENT_REPLICATE);
         RegionAttributes attrs2 = factory.create();
-        // DebuggerSupport.waitForJavaDebugger(rtc.getLogWriter(), "About to create region...");
         Region rgn = DiskRegionTestImpl.this.rtc.createRegion(name, attrs2);
 
         // verify
diff --git a/geode-core/src/test/java/org/apache/geode/cache30/MultiVMRegionTestCase.java b/geode-core/src/test/java/org/apache/geode/cache30/MultiVMRegionTestCase.java
index ff67365..08ffe15 100644
--- a/geode-core/src/test/java/org/apache/geode/cache30/MultiVMRegionTestCase.java
+++ b/geode-core/src/test/java/org/apache/geode/cache30/MultiVMRegionTestCase.java
@@ -604,7 +604,6 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     SerializableRunnable create = new CacheSerializableRunnable("Create Region") {
       @Override
       public void run2() throws CacheException {
-        // DebuggerSupport.waitForJavaDebugger(getLogWriter(), " about to create region");
         Region region = createRegion(name);
         assertTrue(!region.isDestroyed());
         Region root = region.getParentRegion();
@@ -628,7 +627,6 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     SerializableRunnable put = new CacheSerializableRunnable("Put key/value") {
       @Override
       public void run2() throws CacheException {
-        // DebuggerSupport.waitForJavaDebugger(getLogWriter(), " about to put");
         Region region = getRootRegion().getSubregion(name);
         region.put(key, value);
         assertTrue(!region.isDestroyed());
@@ -648,7 +646,6 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
         assertTrue(!root.isDestroyed());
         Region region = root.getSubregion(name);
         assertTrue(!region.isDestroyed());
-        // DebuggerSupport.waitForJavaDebugger(getLogWriter(), " about to get");
         assertEquals(value, region.getEntry(key).getValue());
       }
     };
@@ -4841,8 +4838,6 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
               // at magical number 301, do a region invalidation, then continue
               // as before
               if (i == 301) {
-                // DebuggerSupport.waitForJavaDebugger(getLogWriter(), "About to invalidate
-                // region");
                 // wait for previous updates to be processed
                 flushIfNecessary(region);
                 region.invalidateRegion();
@@ -4857,12 +4852,6 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
                   // this works without enabling statistics
                   Object value = new Long(System.currentTimeMillis());
                   region.put(key, value);
-                  // no longer safe since get is not allowed to member doing GII
-                  // if (getRegionAttributes().getScope().isDistributedAck()) {
-                  // // do a nonblocking netSearch
-                  // region.localInvalidate(key);
-                  // assertIndexDetailsEquals(value, region.get(key));
-                  // }
                   break;
                 case 3: // INVALIDATE
                   region.invalidate(key);
diff --git a/geode-core/src/test/java/org/apache/geode/cache30/ReconnectDUnitTest.java b/geode-core/src/test/java/org/apache/geode/cache30/ReconnectDUnitTest.java
index 4db8f92..ebad555 100755
--- a/geode-core/src/test/java/org/apache/geode/cache30/ReconnectDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache30/ReconnectDUnitTest.java
@@ -200,7 +200,6 @@ public class ReconnectDUnitTest extends JUnit4CacheTestCase {
     SerializableCallable create =
         new SerializableCallable("Create Cache and Regions from cache.xml") {
           public Object call() throws CacheException {
-            // DebuggerSupport.waitForJavaDebugger(getLogWriter(), " about to create region");
             locatorPort = locPort;
             Properties props = getDistributedSystemProperties();
             props.put(CACHE_XML_FILE, xmlFileLoc + fileSeparator + "MyDisconnect-cache.xml");
@@ -212,8 +211,6 @@ public class ReconnectDUnitTest extends JUnit4CacheTestCase {
             Region myRegion = cache.getRegion("root/myRegion");
             ReconnectDUnitTest.savedSystem = cache.getDistributedSystem();
             myRegion.put("MyKey1", "MyValue1");
-            // MembershipManagerHelper.getMembershipManager(cache.getDistributedSystem()).setDebugJGroups(true);
-            // myRegion.put("Mykey2", "MyValue2");
             return savedSystem.getDistributedMember();
           }
         };
@@ -254,8 +251,6 @@ public class ReconnectDUnitTest extends JUnit4CacheTestCase {
   public void doTestReconnectOnForcedDisconnect(final boolean createInAppToo) throws Exception {
 
     IgnoredException.addIgnoredException("killing member's ds");
-    // getSystem().disconnect();
-    // getLogWriter().fine("Cache Closed ");
 
     Host host = Host.getHost(0);
     VM vm0 = host.getVM(0);
@@ -272,18 +267,15 @@ public class ReconnectDUnitTest extends JUnit4CacheTestCase {
     SerializableCallable create1 =
         new SerializableCallable("Create Cache and Regions from cache.xml") {
           public Object call() throws CacheException {
-            // DebuggerSupport.waitForJavaDebugger(getLogWriter(), " about to create region");
             locatorPort = locPort;
             Properties props = getDistributedSystemProperties();
             props.put(CACHE_XML_FILE, xmlFileLoc + fileSeparator + "MyDisconnect-cache.xml");
             props.put(MAX_WAIT_TIME_RECONNECT, "1000");
             props.put(MAX_NUM_RECONNECT_TRIES, "2");
-            // props.put("log-file", "autoReconnectVM"+VM.getCurrentVMNum()+"_"+getPID()+".log");
             Cache cache = new CacheFactory(props).create();
             Region myRegion = cache.getRegion("root/myRegion");
             ReconnectDUnitTest.savedSystem = cache.getDistributedSystem();
             myRegion.put("MyKey1", "MyValue1");
-            // myRegion.put("Mykey2", "MyValue2");
             return savedSystem.getDistributedMember();
           }
         };
@@ -291,7 +283,6 @@ public class ReconnectDUnitTest extends JUnit4CacheTestCase {
     SerializableCallable create2 =
         new SerializableCallable("Create Cache and Regions from cache.xml") {
           public Object call() throws CacheException {
-            // DebuggerSupport.waitForJavaDebugger(getLogWriter(), " about to create region");
             locatorPort = locPort;
             final Properties props = getDistributedSystemProperties();
             props.put(CACHE_XML_FILE, xmlFileLoc + fileSeparator + "MyDisconnect-cache.xml");
@@ -299,16 +290,12 @@ public class ReconnectDUnitTest extends JUnit4CacheTestCase {
             props.put(MAX_NUM_RECONNECT_TRIES, "2");
             props.put(START_LOCATOR, "localhost[" + secondLocPort + "]");
             props.put(LOCATORS, props.get(LOCATORS) + ",localhost[" + secondLocPort + "]");
-            // props.put("log-file", "autoReconnectVM"+VM.getCurrentVMNum()+"_"+getPID()+".log");
             getSystem(props);
-            // MembershipManagerHelper.getMembershipManager(system).setDebugJGroups(true);
             final Cache cache = getCache();
             ReconnectDUnitTest.savedSystem = cache.getDistributedSystem();
             Region myRegion = cache.getRegion("root/myRegion");
-            // myRegion.put("MyKey1", "MyValue1");
             myRegion.put("Mykey2", "MyValue2");
             assertNotNull(myRegion.get("MyKey1"));
-            // getLogWriter().fine("MyKey1 value is : "+myRegion.get("MyKey1"));
             if (createInAppToo) {
               Thread recreateCacheThread = new Thread("ReconnectDUnitTest.createInAppThread") {
                 public void run() {
diff --git a/geode-core/src/test/java/org/apache/geode/cache30/RegionTestCase.java b/geode-core/src/test/java/org/apache/geode/cache30/RegionTestCase.java
index 4b45e62..eb5b362 100644
--- a/geode-core/src/test/java/org/apache/geode/cache30/RegionTestCase.java
+++ b/geode-core/src/test/java/org/apache/geode/cache30/RegionTestCase.java
@@ -2195,7 +2195,6 @@ public abstract class RegionTestCase extends JUnit4CacheTestCase {
 
     // This value SHOULD expire
 
-    // DebuggerSupport.waitForJavaDebugger(getLogWriter(), "Set breakpoint in invalidate");
     ExpiryTask.suspendExpiration();
     Region.Entry entry = null;
     long tilt;
@@ -2278,8 +2277,6 @@ public abstract class RegionTestCase extends JUnit4CacheTestCase {
     try {
       region = createRegion(name, attrs);
 
-      // DebuggerSupport.waitForJavaDebugger(getLogWriter(), "Set breakpoint in
-      // invalidate");
       ExpiryTask.suspendExpiration();
       Region.Entry entry = null;
       eventCount = 0;
@@ -2443,104 +2440,6 @@ public abstract class RegionTestCase extends JUnit4CacheTestCase {
     eventCount = 0;
   }
 
-  // /**
-  // * Expire an entry with a ttl time. Set a new ttl time, create the
-  // * same entry again, make sure it observes the <em>new</em> ttl time.
-  // * Do this many times.
-  // */
-  // public void testEntryTtl4() {
-  // if (!supportsExpiration()) {
-  // return;
-  // }
-  // final String name = this.getUniqueName();
-  // final int timeout1 = 200; // ms
-  // final int timeout2 = 2000;
-  // final String key1 = "KEY1";
-  // final String value1 = "VALUE1";
-  // final String value2 = "VALUE2";
-  //
-  // AttributesFactory factory = new AttributesFactory(getRegionAttributes());
-  // ExpirationAttributes expire1 =
-  // new ExpirationAttributes(timeout1, ExpirationAction.INVALIDATE);
-  // factory.setEntryTimeToLive(expire1);
-  // factory.setStatisticsEnabled(true);
-  // TestCacheListener list = new TestCacheListener() {
-  // public void afterCreate2(EntryEvent e) { }
-  // public void afterUpdate2(EntryEvent e) { }
-  // public void afterDestroy2(EntryEvent e) { }
-  // public void afterInvalidate2(EntryEvent e) { eventCount ++; }
-  // };
-  // eventCount = 0;
-  // factory.addCacheListener(list);
-  // RegionAttributes attrs = factory.create();
-  //
-  // Region region = null;
-  // System.setProperty(LocalRegion.EXPIRY_MS_PROPERTY", "true");
-  // try {
-  // region = createRegion(name, attrs);
-  // } finally {
-  // System.getProperties().remove(LocalRegion.EXPIRY_MS_PROPERTY);
-  // }
-  //
-  // for (int i = 0; i < 10; i ++) {
-  // // DebuggerSupport.waitForJavaDebugger(getLogWriter(), "Set breakpoint in invalidate");
-  // ExpiryTask.suspendExpiration();
-  // Region.Entry entry = null;
-  // long tilt;
-  // try {
-  // region.create(key1, value1);
-  // tilt = System.currentTimeMillis() + timeout1;
-  // assertTrue(list.waitForInvocation(1000));
-  // entry = region.getEntry(key1);
-  // Assert.assertTrue(value1.equals(entry.getValue()));
-  // } finally {
-  // ExpiryTask.permitExpiration();
-  // }
-  // waitForInvalidate(entry, tilt);
-  // assertTrue(list.waitForInvocation(1000));
-  // assertTrue(eventCount == 1);
-  // eventCount = 0;
-  //
-  // // Do it again with a put (I guess)
-  // ExpiryTask.suspendExpiration();
-  // try {
-  // region.put(key1, value1);
-  // tilt = System.currentTimeMillis() + timeout1;
-  // entry = region.getEntry(key1);
-  // Assert.assertTrue(value1.equals(entry.getValue()));
-  // } finally {
-  // ExpiryTask.permitExpiration();
-  // }
-  // waitForInvalidate(entry, tilt);
-  // assertTrue(list.waitForInvocation(1000));
-  // assertTrue(eventCount == 1);
-  // eventCount = 0;
-  //
-  // // Change custom expiry for this region now...
-  // AttributesMutator mutt = region.getAttributesMutator();
-  // ExpirationAttributes expire2 =
-  // new ExpirationAttributes(timeout2, ExpirationAction.INVALIDATE);
-  // mutt.setEntryTimeToLive(expire2);
-  //
-  // ExpiryTask.suspendExpiration();
-  // try {
-  // region.put(key1, value2);
-  // tilt = System.currentTimeMillis() + timeout2;
-  // entry = region.getEntry(key1);
-  // Assert.assertTrue(value2.equals(entry.getValue()));
-  // } finally {
-  // ExpiryTask.permitExpiration();
-  // }
-  // waitForInvalidate(entry, tilt);
-  // assertTrue(list.waitForInvocation(1000));
-  // assertTrue(eventCount == 1);
-  // eventCount = 0;
-  //
-  // region.destroy(key1);
-  // }
-  // }
-
-
   /**
    * Tests that an entry whose value is loaded into a region expires with an invalidation after a
    * given time to live.
@@ -2569,7 +2468,6 @@ public abstract class RegionTestCase extends JUnit4CacheTestCase {
     try {
       region = createRegion(name, attrs);
 
-      // DebuggerSupport.waitForJavaDebugger(getLogWriter(), "About to get");
       ExpiryTask.suspendExpiration();
       Region.Entry entry = null;
       long tilt;
@@ -2749,8 +2647,6 @@ public abstract class RegionTestCase extends JUnit4CacheTestCase {
     try {
       region = createRegion(name, attrs);
 
-      // DebuggerSupport.waitForJavaDebugger(getLogWriter(), "Set breakpoint in
-      // invalidate");
       ExpiryTask.suspendExpiration();
       Region.Entry entry = null;
       long tilt;
@@ -2863,7 +2759,6 @@ public abstract class RegionTestCase extends JUnit4CacheTestCase {
 
     // This value SHOULD expire
 
-    // DebuggerSupport.waitForJavaDebugger(getLogWriter(), "Set breakpoint in invalidate");
     ExpiryTask.suspendExpiration();
     Region.Entry entry = null;
     long tilt;
@@ -2941,7 +2836,6 @@ public abstract class RegionTestCase extends JUnit4CacheTestCase {
 
     // This value SHOULD expire
 
-    // DebuggerSupport.waitForJavaDebugger(getLogWriter(), "Set breakpoint in invalidate");
     ExpiryTask.suspendExpiration();
     Region.Entry entry = null;
     long tilt;
@@ -3163,103 +3057,6 @@ public abstract class RegionTestCase extends JUnit4CacheTestCase {
     eventCount = 0;
   }
 
-  // /**
-  // * Expire an entry with a given idle time. Set a new idle time, create the
-  // * same entry again, make sure it observes the <em>new</em> idle time. Do this
-  // * many times.
-  // */
-  // public void testEntryIdleTimeout4() {
-  // if (!supportsExpiration()) {
-  // return;
-  // }
-  // final String name = this.getUniqueName();
-  // final int timeout1 = 200; // ms
-  // final int timeout2 = 2000;
-  // final String key1 = "KEY1";
-  // final String value1 = "VALUE1";
-  // final String value2 = "VALUE2";
-  //
-  // AttributesFactory factory = new AttributesFactory(getRegionAttributes());
-  // ExpirationAttributes expire1 =
-  // new ExpirationAttributes(timeout1, ExpirationAction.INVALIDATE);
-  // factory.setEntryIdleTimeout(expire1);
-  // factory.setStatisticsEnabled(true);
-  // TestCacheListener list = new TestCacheListener() {
-  // public void afterCreate2(EntryEvent e) { }
-  // public void afterUpdate2(EntryEvent e) { }
-  // public void afterDestroy2(EntryEvent e) { }
-  // public void afterInvalidate2(EntryEvent e) { eventCount ++; }
-  // };
-  // eventCount = 0;
-  // factory.addCacheListener(list);
-  // RegionAttributes attrs = factory.create();
-  //
-  // Region region = null;
-  // System.setProperty(LocalRegion.EXPIRY_MS_PROPERTY, "true");
-  // try {
-  // region = createRegion(name, attrs);
-  // } finally {
-  // System.getProperties().remove(LocalRegion.EXPIRY_MS_PROPERTY);
-  // }
-  //
-  // for (int i = 0; i < 10; i ++) {
-  // // DebuggerSupport.waitForJavaDebugger(getLogWriter(), "Set breakpoint in invalidate");
-  // ExpiryTask.suspendExpiration();
-  // Region.Entry entry = null;
-  // long tilt;
-  // try {
-  // region.create(key1, value1);
-  // tilt = System.currentTimeMillis() + timeout1;
-  // assertTrue(list.waitForInvocation(1000));
-  // entry = region.getEntry(key1);
-  // Assert.assertTrue(value1.equals(entry.getValue()));
-  // } finally {
-  // ExpiryTask.permitExpiration();
-  // }
-  // waitForInvalidate(entry, tilt);
-  // assertTrue(list.waitForInvocation(1000));
-  // assertTrue(eventCount == 1);
-  // eventCount = 0;
-  //
-  // // Do it again with a put (I guess)
-  // ExpiryTask.suspendExpiration();
-  // try {
-  // region.put(key1, value1);
-  // tilt = System.currentTimeMillis() + timeout1;
-  // entry = region.getEntry(key1);
-  // Assert.assertTrue(value1.equals(entry.getValue()));
-  // } finally {
-  // ExpiryTask.permitExpiration();
-  // }
-  // waitForInvalidate(entry, tilt);
-  // assertTrue(list.waitForInvocation(1000));
-  // assertTrue(eventCount == 1);
-  // eventCount = 0;
-  //
-  // // Change expiry for this region now...
-  // AttributesMutator mutt = region.getAttributesMutator();
-  // ExpirationAttributes expire2 =
-  // new ExpirationAttributes(timeout2, ExpirationAction.INVALIDATE);
-  // mutt.setEntryIdleTimeout(expire2);
-  //
-  // ExpiryTask.suspendExpiration();
-  // try {
-  // region.put(key1, value2);
-  // tilt = System.currentTimeMillis() + timeout2;
-  // entry = region.getEntry(key1);
-  // Assert.assertTrue(value2.equals(entry.getValue()));
-  // } finally {
-  // ExpiryTask.permitExpiration();
-  // }
-  // waitForInvalidate(entry, tilt);
-  // assertTrue(list.waitForInvocation(1000));
-  // assertTrue(eventCount == 1);
-  // eventCount = 0;
-  //
-  // region.destroy(key1);
-  // }
-  // }
-
   static class CountExpiry implements CustomExpiry, Declarable {
 
     /**
@@ -3415,7 +3212,6 @@ public abstract class RegionTestCase extends JUnit4CacheTestCase {
     try {
       LocalRegion region = (LocalRegion) createRegion(name, attrs);
 
-      // DebuggerSupport.waitForJavaDebugger(getLogWriter(), "Set breakpoint in invalidate");
       ExpiryTask.suspendExpiration();
       try {
         region.create(key1, value);
@@ -4002,7 +3798,6 @@ public abstract class RegionTestCase extends JUnit4CacheTestCase {
 
       assertTrue(preSnapshotRegion.keySet().size() == 0);
 
-      // DebuggerSupport.waitForJavaDebugger(getLogWriter());
       InputStream in = new FileInputStream(file);
       preSnapshotRegion.loadSnapshot(in);
 
@@ -4068,7 +3863,6 @@ public abstract class RegionTestCase extends JUnit4CacheTestCase {
 
       LogWriter log = getCache().getLogger();
       log.info("before loadSnapshot");
-      // DebuggerSupport.waitForJavaDebugger(getLogWriter());
       InputStream in = new FileInputStream(file);
       preSnapshotRegion.loadSnapshot(in);
       log.info("after loadSnapshot");
diff --git a/geode-core/src/test/java/org/apache/geode/codeAnalysis/AnalyzeSerializablesJUnitTest.java b/geode-core/src/test/java/org/apache/geode/codeAnalysis/AnalyzeSerializablesJUnitTest.java
index c72a1bf..241944c 100644
--- a/geode-core/src/test/java/org/apache/geode/codeAnalysis/AnalyzeSerializablesJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/codeAnalysis/AnalyzeSerializablesJUnitTest.java
@@ -278,7 +278,14 @@ public class AnalyzeSerializablesJUnitTest {
       String className = details.className.replaceAll("/", ".");
       System.out.println("testing class " + details.className);
 
-      Class sanctionedClass = Class.forName(className);
+      Class sanctionedClass = null;
+      try {
+        sanctionedClass = Class.forName(className);
+      } catch (ClassNotFoundException cnf) {
+        fail(className + " cannot be found.  It may need to be removed from "
+            + expectedSerializablesFileName);
+      }
+
       assertTrue(
           sanctionedClass.getName() + " is not Serializable and should be removed from "
               + expectedSerializablesFileName,
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/DebuggerUtils.java b/geode-core/src/test/java/org/apache/geode/test/dunit/DebuggerUtils.java
deleted file mode 100755
index 59a657a..0000000
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/DebuggerUtils.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.test.dunit;
-
-import org.apache.geode.internal.util.DebuggerSupport;
-
-/**
- * {@code DebuggerUtils} provides static utility methods that facilitate runtime debugging.
- *
- * <p>
- * These methods can be used directly: {@code DebuggerUtils.attachDebugger(...)}, however, they are
- * intended to be referenced through static import:
- *
- * <pre>
- * import static org.apache.geode.test.dunit.DebuggerUtils.*;
- *    ...
- *    attachDebugger(...);
- * </pre>
- *
- * Extracted from DistributedTestCase.
- *
- * @see org.apache.geode.internal.util.DebuggerSupport
- */
-public class DebuggerUtils {
-
-  protected DebuggerUtils() {
-    // nothing
-  }
-
-  @SuppressWarnings("serial")
-  public static void attachDebugger(final VM vm, final String message) {
-    vm.invoke(
-        new SerializableRunnable(DebuggerSupport.class.getSimpleName() + " waitForJavaDebugger") {
-          public void run() {
-            DebuggerSupport.waitForJavaDebugger(message);
-          }
-        });
-  }
-
-}

-- 
To stop receiving notification emails like this one, please contact
prhomberg@apache.org.

Mime
View raw message