keith-turner commented on code in PR #4659:
URL: https://github.com/apache/accumulo/pull/4659#discussion_r1639842094


##########
test/src/main/java/org/apache/accumulo/test/ample/FlakyInterceptor.java:
##########
@@ -0,0 +1,94 @@
+/*
+ * 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
+ *
+ *   https://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.accumulo.test.ample;
+
+import static org.apache.accumulo.core.client.ConditionalWriter.Status.UNKNOWN;
+import static org.apache.accumulo.core.util.LazySingletons.RANDOM;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.accumulo.core.client.ConditionalWriter;
+import org.apache.accumulo.core.data.ConditionalMutation;
+import org.apache.accumulo.test.ample.metadata.ConditionalWriterInterceptor;
+import org.apache.hadoop.io.Text;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class FlakyInterceptor implements ConditionalWriterInterceptor {

Review Comment:
   More determinism would be nice.  Seems like it would lead to more test, 
which is probably ok.  Like would have ComprehensiveFlakyAmple1IT that runs w/ 
pattern A, ComprehensiveFlakyAmple2IT that runs w/ pattern B for the 
FlakyInterceptor, etc.   Seems like some memory would be needed as multiple 
rows may be written w/ different collumns, so need reset/restart the pattern 
when that changes.
   
   If a test fails the randomness may make it hard to debug.  It would probably 
be generally useful to add a bit more logging around handing of unknown as 
these should be rare, so it be nice if the code logged some breadcrumbs when 
they happen and it reacts to them.  That should be a quick change, will add a 
PR for that.



-- 
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: notifications-unsubscr...@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to