You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by we...@apache.org on 2019/05/15 02:22:20 UTC

[samza] branch master updated: SAMZA-2193: Fix unit-test failure after making rate limiter as a required config.

This is an automated email from the ASF dual-hosted git repository.

weisong44 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/samza.git


The following commit(s) were added to refs/heads/master by this push:
     new df36b42  SAMZA-2193: Fix unit-test failure after making rate limiter as a required config.
     new c4afc2e  Merge pull request #1032 from dengpanyin/bug-fix
df36b42 is described below

commit df36b4288a8f5bb3e254f944187417e764c05cba
Author: dyin <dy...@linkedin.com>
AuthorDate: Tue May 14 18:05:27 2019 -0700

    SAMZA-2193: Fix unit-test failure after making rate limiter as a required config.
    
    A recent code merge makes rate limiter as a required config. It break some
    new tests that are added after that PR is created and checked in before that PR is commited.
---
 .../samza/table/remote/descriptors/TestRemoteTableDescriptor.java   | 1 +
 .../apache/samza/test/table/TestCouchbaseRemoteTableEndToEnd.java   | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/samza-core/src/test/java/org/apache/samza/table/remote/descriptors/TestRemoteTableDescriptor.java b/samza-core/src/test/java/org/apache/samza/table/remote/descriptors/TestRemoteTableDescriptor.java
index e13e86a..5bc8339 100644
--- a/samza-core/src/test/java/org/apache/samza/table/remote/descriptors/TestRemoteTableDescriptor.java
+++ b/samza-core/src/test/java/org/apache/samza/table/remote/descriptors/TestRemoteTableDescriptor.java
@@ -217,6 +217,7 @@ public class TestRemoteTableDescriptor {
   public void testTableRetryPolicyToConfig() {
     Map<String, String> tableConfig = new RemoteTableDescriptor("1").withReadFunction(createMockTableReadFunction())
         .withReadRetryPolicy(new TableRetryPolicy())
+        .withRateLimiterDisabled()
         .toConfig(new MapConfig());
     Assert.assertEquals(tableConfig.get("tables.1.io.read.retry.policy.TableRetryPolicy"),
         "{\"exponentialFactor\":0.0,\"backoffType\":\"NONE\",\"retryPredicate\":{}}");
diff --git a/samza-test/src/test/java/org/apache/samza/test/table/TestCouchbaseRemoteTableEndToEnd.java b/samza-test/src/test/java/org/apache/samza/test/table/TestCouchbaseRemoteTableEndToEnd.java
index 535d8a2..b05adcd 100644
--- a/samza-test/src/test/java/org/apache/samza/test/table/TestCouchbaseRemoteTableEndToEnd.java
+++ b/samza-test/src/test/java/org/apache/samza/test/table/TestCouchbaseRemoteTableEndToEnd.java
@@ -143,11 +143,13 @@ public class TestCouchbaseRemoteTableEndToEnd extends IntegrationTestHarness {
               .withBootstrapHttpDirectPort(couchbaseMock.getHttpPort());
 
       RemoteTableDescriptor<String, String> inputTableDesc = new RemoteTableDescriptor<>("input-table");
-      inputTableDesc.withReadFunction(readFunction);
+      inputTableDesc.withReadFunction(readFunction).withRateLimiterDisabled();
       Table<KV<String, String>> inputTable = appDesc.getTable(inputTableDesc);
 
       RemoteTableDescriptor<String, JsonObject> outputTableDesc = new RemoteTableDescriptor<>("output-table");
-      outputTableDesc.withReadFunction(new DummyReadFunction<>()).withWriteFunction(writeFunction);
+      outputTableDesc.withReadFunction(new DummyReadFunction<>())
+          .withWriteFunction(writeFunction)
+          .withRateLimiterDisabled();
       Table<KV<String, JsonObject>> outputTable = appDesc.getTable(outputTableDesc);
 
       appDesc.getInputStream(inputDescriptor)