smiklosovic commented on code in PR #2649:
URL: https://github.com/apache/cassandra/pull/2649#discussion_r1311212535


##########
test/distributed/org/apache/cassandra/distributed/test/guardrails/GuardrailBulkLoadEnabledTest.java:
##########
@@ -0,0 +1,144 @@
+/*
+ * 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.cassandra.distributed.test.guardrails;
+
+import java.io.IOException;
+import java.time.Duration;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import com.google.common.collect.ImmutableMap;
+import org.apache.commons.io.FileUtils;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import org.apache.cassandra.config.DatabaseDescriptor;
+import org.apache.cassandra.db.ColumnFamilyStore;
+import org.apache.cassandra.db.Keyspace;
+import org.apache.cassandra.db.guardrails.Guardrails;
+import org.apache.cassandra.distributed.Cluster;
+import org.apache.cassandra.distributed.api.Feature;
+import org.apache.cassandra.io.util.File;
+import org.apache.cassandra.service.StorageService;
+import org.apache.cassandra.tools.BulkLoader;
+import org.apache.cassandra.tools.ToolRunner;
+
+import static com.google.common.collect.Lists.transform;
+import static org.apache.cassandra.distributed.shared.AssertUtils.assertRows;
+import static org.apache.cassandra.distributed.shared.AssertUtils.row;
+import static org.apache.cassandra.distributed.test.ExecUtil.rethrow;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * Tests the guardrails for bulk load, {@link Guardrails#bulkLoadEnabled}.
+ */
+public class GuardrailBulkLoadEnabledTest extends GuardrailTester

Review Comment:
   You are not testing that enabled bulk loading is loading sstables and that 
we can enable and disable (go back and forth) You only test that disabled bulk 
loading is not loading them.
   
   I would do:
   
   1) start a node
   2) create tables, add data, backup sstables, truncate
   2) bulk load sstables and verify data are there, truncate again
   3) disable bulk load (by calling a respective method on `Guardrails` on 
server side)
   4) bulk load sstables and verify that it is not loading it
   5) enable bulk load by same mean as in 3)
   6) load sstables and verify it is loading it
   
   4-6 is important as we know that we can actually go with enable -> disable 
-> enable so we can alter this configuration and it works as expected.
   
   



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to