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


##########
test/src/main/java/org/apache/accumulo/test/fate/FatePoolsWatcherIT.java:
##########
@@ -0,0 +1,477 @@
+/*
+ * 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.fate;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import java.util.Set;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.stream.Collectors;
+
+import org.apache.accumulo.core.conf.AccumuloConfiguration;
+import org.apache.accumulo.core.conf.ConfigurationCopy;
+import org.apache.accumulo.core.conf.Property;
+import org.apache.accumulo.core.fate.Fate;
+import org.apache.accumulo.core.fate.FateId;
+import org.apache.accumulo.core.fate.FateInstanceType;
+import org.apache.accumulo.core.fate.FateStore;
+import org.apache.accumulo.core.fate.Repo;
+import org.apache.accumulo.harness.SharedMiniClusterBase;
+import org.apache.accumulo.server.ServerContext;
+import org.apache.accumulo.test.util.Wait;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Tests the functionality of the FATE pools watcher task
+ */
+public abstract class FatePoolsWatcherIT extends SharedMiniClusterBase

Review Comment:
   These are really nice tests.  
   
   Not sure if its covered, another test that may be useful is one that ensures 
things are being partitioned correctly among the pools.  
   
   The following is a rough stab at doing this.
   
    1. Create FateExectuor_1 w/ 2 threads
    2. Create FateExectuor_2 w/ 3 threads
    3. Create FateExectuor_3 w/ 4 threads
    4. Create FateExectuor_4 w/ 5 threads
    5. Seed 5 things to run on FateExectuor_1
    6. Seed 6 things to run on FateExectuor_2
    7. Seed 1 thing to run on FateExectuor_3
    8. Seed 4 things to run on FateExectuor_4
    
   Should eventually see 2 running on FateExectuor_1, 3 running on 
FateExectuor_2, 1 running on FateExectuor_3, and 4 running on FateExectuor_4.  
So for each executor should see the `min(configuredThreads, seededTask)` 
actually running.  Giving some executors more work than they have threads and 
some less at the same time. Hoping this would pick up on some cases where an 
executor snags some work its not supposed to.  Tried to pick number that made 
the inputs to min() unique and the result of min() unique.
   
   The existing test seem to create the exact number of task as threads in most 
cases. When the existing test create more task that threads seems like its only 
for one executor.  Was attempting to have multiple executors w/ different 
threads and different numbers of task that differ from the number of threads in 
for the target executor. 
   



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

Reply via email to