adelapena commented on code in PR #1684: URL: https://github.com/apache/cassandra/pull/1684#discussion_r942725589
########## test/unit/org/apache/cassandra/db/guardrails/GuardrailColumnValueSizeTest.java: ########## @@ -0,0 +1,650 @@ +/* + * 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.db.guardrails; + +import java.nio.ByteBuffer; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.function.Function; + +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableSet; +import org.junit.Test; + +import org.apache.cassandra.db.marshal.BytesType; +import org.apache.cassandra.db.marshal.ListType; +import org.apache.cassandra.db.marshal.MapType; +import org.apache.cassandra.db.marshal.SetType; + +import static java.lang.String.format; +import static java.nio.ByteBuffer.allocate; + +/** + * Tests the guardrail for the size of column values, {@link Guardrails#columnValueSize}. + */ +public class GuardrailColumnValueSizeTest extends ThresholdTester Review Comment: Makes sense. If we are going to extend those tests to cover not only special converters we should include quite a bunch of properties, not only the two new properties that are proposed here. So I think I would prefer to do it in a separate ticket covering all existing properties, and maybe also for 4.1 if we can do it on time. By the way, it's not the same since it doesn't involve parsing, but `ThresholdTester` has some checks around the default value, [here](https://github.com/apache/cassandra/blob/5627ed1c8e9e264031675d3283de67b0f41af534/test/unit/org/apache/cassandra/db/guardrails/ThresholdTester.java#L273-L274). -- 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]

