maedhroz commented on a change in pull request #1045:
URL: https://github.com/apache/cassandra/pull/1045#discussion_r651429617
##########
File path:
test/unit/org/apache/cassandra/transport/ClientResourceLimitsTest.java
##########
@@ -40,54 +39,58 @@
import org.apache.cassandra.db.marshal.UTF8Type;
import org.apache.cassandra.db.virtual.*;
import org.apache.cassandra.exceptions.OverloadedException;
-import org.apache.cassandra.metrics.CassandraMetricsRegistry;
import org.apache.cassandra.schema.TableMetadata;
import org.apache.cassandra.transport.messages.QueryMessage;
import org.apache.cassandra.utils.FBUtilities;
import static org.apache.cassandra.Util.spinAssertEquals;
+import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
public class ClientResourceLimitsTest extends CQLTester
{
-
private static final long LOW_LIMIT = 600L;
private static final long HIGH_LIMIT = 5000000000L;
- private static final QueryOptions V5_DEFAULT_OPTIONS = QueryOptions.create(
- QueryOptions.DEFAULT.getConsistency(),
- QueryOptions.DEFAULT.getValues(),
- QueryOptions.DEFAULT.skipMetadata(),
- QueryOptions.DEFAULT.getPageSize(),
- QueryOptions.DEFAULT.getPagingState(),
- QueryOptions.DEFAULT.getSerialConsistency(),
- ProtocolVersion.V5,
- KEYSPACE);
+ private static final QueryOptions V5_DEFAULT_OPTIONS =
+ QueryOptions.create(QueryOptions.DEFAULT.getConsistency(),
+ QueryOptions.DEFAULT.getValues(),
+ QueryOptions.DEFAULT.skipMetadata(),
+ QueryOptions.DEFAULT.getPageSize(),
+ QueryOptions.DEFAULT.getPagingState(),
+ QueryOptions.DEFAULT.getSerialConsistency(),
+ ProtocolVersion.V5,
+ KEYSPACE);
@BeforeClass
public static void setUp()
{
DatabaseDescriptor.setNativeTransportReceiveQueueCapacityInBytes(1);
DatabaseDescriptor.setNativeTransportMaxConcurrentRequestsInBytesPerIp(LOW_LIMIT);
DatabaseDescriptor.setNativeTransportMaxConcurrentRequestsInBytes(LOW_LIMIT);
- requireNetwork();
+
DatabaseDescriptor.setNativeTransportRequestsPerSecond(Double.MAX_VALUE);
+
+ // The driver control connections would send queries that might
interfere with the tests.
+ requireNetworkWithoutDriver();
}
@AfterClass
public static void tearDown()
{
DatabaseDescriptor.setNativeTransportMaxConcurrentRequestsInBytesPerIp(3000000000L);
DatabaseDescriptor.setNativeTransportMaxConcurrentRequestsInBytes(HIGH_LIMIT);
+
DatabaseDescriptor.setNativeTransportRequestsPerSecond(Double.MAX_VALUE);
}
@Before
public void setLimits()
{
ClientResourceLimits.setGlobalLimit(LOW_LIMIT);
ClientResourceLimits.setEndpointLimit(LOW_LIMIT);
+
ClientResourceLimits.setNativeTransportRequestsPerSecond(Double.MAX_VALUE);
Review comment:
This isn't necessary any longer, with rate limiting disabled by default.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]