You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2016/09/02 17:36:06 UTC

[1/3] incubator-geode git commit: GEODE-1832: remove dependency on cacheRunner package

Repository: incubator-geode
Updated Branches:
  refs/heads/develop 426f1ae22 -> d2d62d680


GEODE-1832: remove dependency on cacheRunner package

Comment out disabled test with note about how to rewrite the test. See
GEODE-1837.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/68e770f4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/68e770f4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/68e770f4

Branch: refs/heads/develop
Commit: 68e770f422f2671bb60db79d7bb7999adcef2bfd
Parents: 426f1ae
Author: Kirk Lund <kl...@apache.org>
Authored: Thu Sep 1 17:07:36 2016 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Fri Sep 2 09:43:20 2016 -0700

----------------------------------------------------------------------
 .../cache/query/dunit/RemoteQueryDUnitTest.java       | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/68e770f4/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java
index 3ab90c9..686efb0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java
@@ -29,9 +29,6 @@ import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import cacheRunner.Portfolio;
-import cacheRunner.Position;
-
 import com.gemstone.gemfire.DataSerializable;
 import com.gemstone.gemfire.DataSerializer;
 import com.gemstone.gemfire.cache.AttributesFactory;
@@ -53,7 +50,6 @@ import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
 import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
@@ -486,10 +482,10 @@ public class RemoteQueryDUnitTest extends JUnit4CacheTestCase {
   /**
    * Tests remote complex query execution.
    */
-  @Ignore("TODO: test is disabled")
+  @Ignore("GEODE-1837: rewrite this test using Portfolio and Position in package com.gemstone.gemfire.cache.query.data")
   @Test
   public void testRemoteComplexQueries() throws CacheException {
-
+/*
     final String name = this.getName();
     final Host host = Host.getHost(0);
     VM vm0 = host.getVM(0);
@@ -655,7 +651,7 @@ public class RemoteQueryDUnitTest extends JUnit4CacheTestCase {
           SelectResults results = null;
 
           queryString =
-            "IMPORT cacheRunner.Position; " +
+            "IMPORT Position; " +
             "SELECT DISTINCT id, status FROM " + region.getFullPath() +
             "WHERE NOT (SELECT DISTINCT * FROM positions.values posnVal TYPE Position " +
             "WHERE posnVal.secId='AOL' OR posnVal.secId='SAP').isEmpty";
@@ -676,7 +672,7 @@ public class RemoteQueryDUnitTest extends JUnit4CacheTestCase {
       public void run() {
         stopBridgeServer(getCache());
       }
-    });
+    });*/
   }
 
   /**
@@ -1484,7 +1480,7 @@ public class RemoteQueryDUnitTest extends JUnit4CacheTestCase {
     String queryString = "import TestObject; select distinct * from /trade";
 
     String queryString =
-      "IMPORT cacheRunner.Position; " +
+      "IMPORT Position; " +
       "SELECT DISTINCT id, status FROM /root/portfolios " +
       "WHERE NOT (SELECT DISTINCT * FROM positions.values posnVal TYPE Position " +
       "WHERE posnVal.secId='AOL' OR posnVal.secId='SAP').isEmpty";


[3/3] incubator-geode git commit: GEODE-1820: add FlakyTest category

Posted by kl...@apache.org.
GEODE-1820: add FlakyTest category


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/d2d62d68
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/d2d62d68
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/d2d62d68

Branch: refs/heads/develop
Commit: d2d62d6807e96c2c5d684c14c207eab36a4c0d21
Parents: b89f71c
Author: Kirk Lund <kl...@apache.org>
Authored: Fri Sep 2 10:30:05 2016 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Fri Sep 2 10:30:05 2016 -0700

----------------------------------------------------------------------
 .../security/IntegratedClientGetPutAuthDistributedTest.java       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2d62d68/geode-core/src/test/java/com/gemstone/gemfire/security/IntegratedClientGetPutAuthDistributedTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/IntegratedClientGetPutAuthDistributedTest.java b/geode-core/src/test/java/com/gemstone/gemfire/security/IntegratedClientGetPutAuthDistributedTest.java
index 01509ad..6d4374d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/IntegratedClientGetPutAuthDistributedTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/IntegratedClientGetPutAuthDistributedTest.java
@@ -31,9 +31,10 @@ import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.client.ClientCache;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 import com.gemstone.gemfire.test.junit.categories.SecurityTest;
 
-@Category({ DistributedTest.class, SecurityTest.class })
+@Category({ DistributedTest.class, SecurityTest.class, FlakyTest.class })
 public class IntegratedClientGetPutAuthDistributedTest extends AbstractSecureServerDUnitTest {
 
   @Test


[2/3] incubator-geode git commit: GEODE-1838: remove unused test classes

Posted by kl...@apache.org.
GEODE-1838: remove unused test classes


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/b89f71ce
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/b89f71ce
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/b89f71ce

Branch: refs/heads/develop
Commit: b89f71ce6f159b74635ff5a25c216ac09d690b90
Parents: 68e770f
Author: Kirk Lund <kl...@apache.org>
Authored: Thu Sep 1 17:09:54 2016 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Fri Sep 2 09:43:21 2016 -0700

----------------------------------------------------------------------
 .../src/test/java/cacheRunner/Portfolio.java    | 128 -------------------
 .../src/test/java/cacheRunner/Position.java     |  73 -----------
 2 files changed, 201 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b89f71ce/geode-core/src/test/java/cacheRunner/Portfolio.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/cacheRunner/Portfolio.java b/geode-core/src/test/java/cacheRunner/Portfolio.java
deleted file mode 100644
index 5dd2b7e..0000000
--- a/geode-core/src/test/java/cacheRunner/Portfolio.java
+++ /dev/null
@@ -1,128 +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 cacheRunner;
-
-import java.util.*;
-import java.io.Serializable;
-import com.gemstone.gemfire.cache.Declarable;
-
-/**
- * A stock portfolio that consists of multiple {@link Position}
- * objects that represent shares of stock (a "security").  Instances
- * of <code>Portfolio</code> can be stored in a GemFire
- * <code>Region</code> and their contents can be queried using the
- * GemFire query service.
- *
- * <P>
- *
- * This class is <code>Serializable</code> because we want it to be
- * distributed to multiple members of a distributed system.  Because
- * this class is <code>Declarable</code>, we can describe instances of
- * it in a GemFire <code>cache.xml</code> file.
- *
- * @since GemFire 4.0
- */
-public class Portfolio implements Declarable, Serializable {
-  private int id;  /* id is used as the entry key and is stored in the entry */
-  private String type;
-  private Map<String, Position> positions = new HashMap<String, Position>();
-  private String status;
-  
-  /**
-   * Initializes an instance of <code>Portfolio</code> from a
-   * <code>Properties</code> object assembled from data residing in a
-   * <code>cache.xml</code> file.
-   */
-  public void init(Properties props) {
-    this.id = Integer.parseInt(props.getProperty("id"));
-    this.type = props.getProperty("type", "type1");
-    this.status = props.getProperty("status", "active");
-    
-    // get the positions. These are stored in the properties object
-    // as Positions, not String, so use Hashtable protocol to get at them.
-    // the keys are named "positionN", where N is an integer.
-    for (Map.Entry<Object, Object> entry : props.entrySet()) {
-      String key = (String) entry.getKey();
-      if (key.startsWith("position")) {
-        Position pos = (Position) entry.getValue();
-        this.positions.put(pos.getSecId(), pos);
-      }
-    }
-  }
-  
-  /**
-   * Returns the status of this portfolio (<code>active</code> or
-   * <code>inactive</code>). 
-   */
-  public String getStatus(){
-    return status;
-  }
-  
-  /**
-   * Returns the id of this portfolio.  When a <code>Portfolio</code>
-   * placed in a GemFire <code>Region</code> entry, its id is used as
-   * the key.
-   */
-  public int getId(){
-    return this.id;
-  }
-  
-  /**
-   * Returns the positions held in this portfolio.
-   *
-   * @return a <code>Map</code> whose keys are the {@linkplain
-   *         Position#getSecId security ids} and whose values are
-   *         {@link Position} objects.
-   */
-  public Map<String, Position> getPositions(){
-    return this.positions;
-  }
-  
-  /**
-   * Returns the type of this portfolio.  In this example, the type is
-   * an arbitrary string.
-   */
-  public String getType() {
-    return this.type;
-  }
-  
-  /**
-   * Returns whether or not this portfolio is active.
-   */
-  public boolean isActive(){
-    return status.equals("active");
-  }
-  
-  @Override
-  public String toString(){
-    StringBuffer out = new StringBuffer();
-    out.append("\n\tPortfolio [id=" + this.id + " status=" + this.status);
-    out.append(" type=" + this.type);
-    
-    Iterator<Map.Entry<String, Position>> iter = positions.entrySet().iterator();
-    while(iter.hasNext()){
-      Map.Entry<String, Position> entry = iter.next();
-      out.append("\n\t\t");
-      out.append(entry.getKey() + ":" + entry.getValue());
-      if (iter.hasNext()) {
-        out.append(", ");
-      }
-    }
-    out.append("]");
-    return out.toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b89f71ce/geode-core/src/test/java/cacheRunner/Position.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/cacheRunner/Position.java b/geode-core/src/test/java/cacheRunner/Position.java
deleted file mode 100644
index 4e7e6e1..0000000
--- a/geode-core/src/test/java/cacheRunner/Position.java
+++ /dev/null
@@ -1,73 +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 cacheRunner;
-
-import java.util.*;
-import java.io.Serializable;
-import com.gemstone.gemfire.cache.Declarable;
-
-/**
- * Represents a number of shares of a stock ("security") held in a
- * {@link Portfolio}.
- *
- * <P>
- *
- * This class is <code>Serializable</code> because we want it to be
- * distributed to multiple members of a distributed system.  Because
- * this class is <code>Declarable</code>, we can describe instances of
- * it in a GemFire <code>cache.xml</code> file.
- *
- * @since GemFire 4.0
- */
-public class Position implements Declarable, Serializable {
-  private String secId;
-  private double qty;
-  private double mktValue;
-  
-  public void init(Properties props) {
-    this.secId = props.getProperty("secId");
-    this.qty = Double.parseDouble(props.getProperty("qty"));
-    this.mktValue = Double.parseDouble(props.getProperty("mktValue"));
-  }
-  
-  /**
-   * Returns the id of the security held in this position.
-   */
-  public String getSecId(){
-    return this.secId;
-  }
-  
-  /**
-   * Returns the number of shares held in this position.
-   */
-  public double getQty(){
-    return this.qty;
-  }
-    
-  /**
-   * Returns the value of this position.
-   */
-  public double getMktValue() {
-    return this.mktValue;
-  }
-
-  @Override
-  public String toString(){
-    return "Position [secId="+secId+" qty="+this.qty+" mktValue="+mktValue+"]";
-  }
-
-}