You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ma...@apache.org on 2022/10/05 19:23:10 UTC
[cassandra] branch cassandra-4.1 updated: Allow pre-V5 global limit on bytes in flight to revert to zero asynchronously in RateLimitingTest
This is an automated email from the ASF dual-hosted git repository.
maedhroz pushed a commit to branch cassandra-4.1
in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/cassandra-4.1 by this push:
new 8419fb21e0 Allow pre-V5 global limit on bytes in flight to revert to zero asynchronously in RateLimitingTest
8419fb21e0 is described below
commit 8419fb21e016389f15be0954e8721cf4f6918249
Author: Caleb Rackliffe <ca...@gmail.com>
AuthorDate: Tue Oct 4 17:44:34 2022 -0500
Allow pre-V5 global limit on bytes in flight to revert to zero asynchronously in RateLimitingTest
patch by Caleb Rackliffe; reviewed by Brandon Williams for CASSANDRA-17927
---
CHANGES.txt | 1 +
.../unit/org/apache/cassandra/transport/RateLimitingTest.java | 11 ++++++-----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index baeef14565..e9d0b1f1a3 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
4.1-beta1
+ * Allow pre-V5 global limit on bytes in flight to revert to zero asynchronously in RateLimitingTest (CASSANDRA-17927)
* We should not emit deprecation warning on startup for `key_cache_save_period`, `row_cache_save_period`, `counter_cache_save_period` (CASSANDRA-17904)
* upsert with adder support is not consistent with numbers and strings in LWT (CASSANDRA-17857)
* Fix race and return after failing connections (CASSANDRA-17618)
diff --git a/test/unit/org/apache/cassandra/transport/RateLimitingTest.java b/test/unit/org/apache/cassandra/transport/RateLimitingTest.java
index ad4c9c1cdb..0b3fb34a79 100644
--- a/test/unit/org/apache/cassandra/transport/RateLimitingTest.java
+++ b/test/unit/org/apache/cassandra/transport/RateLimitingTest.java
@@ -28,18 +28,19 @@ import java.util.stream.Collectors;
import com.codahale.metrics.Meter;
import com.google.common.base.Ticker;
-import org.apache.cassandra.config.DatabaseDescriptor;
-import org.apache.cassandra.metrics.CassandraMetricsRegistry;
-import org.apache.cassandra.service.StorageService;
+import org.awaitility.Awaitility;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
+import org.apache.cassandra.config.DatabaseDescriptor;
import org.apache.cassandra.cql3.CQLTester;
import org.apache.cassandra.cql3.QueryOptions;
import org.apache.cassandra.exceptions.OverloadedException;
+import org.apache.cassandra.metrics.CassandraMetricsRegistry;
+import org.apache.cassandra.service.StorageService;
import org.apache.cassandra.transport.messages.QueryMessage;
import org.apache.cassandra.utils.Throwables;
@@ -169,7 +170,7 @@ public class RateLimitingTest extends CQLTester
finally
{
// Sanity check bytes in flight limiter.
- assertEquals(0, ClientResourceLimits.getCurrentGlobalUsage());
+ Awaitility.await().untilAsserted(() -> assertEquals(0, ClientResourceLimits.getCurrentGlobalUsage()));
StorageService.instance.setNativeTransportRateLimitingEnabled(false);
}
}
@@ -195,7 +196,7 @@ public class RateLimitingTest extends CQLTester
finally
{
// Sanity the check bytes in flight limiter.
- assertEquals(0, ClientResourceLimits.getCurrentGlobalUsage());
+ Awaitility.await().untilAsserted(() -> assertEquals(0, ClientResourceLimits.getCurrentGlobalUsage()));
StorageService.instance.setNativeTransportRateLimitingEnabled(false);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org