This is an automated email from the ASF dual-hosted git repository.

kturner pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/main by this push:
     new 0fac8775e5 fixes ScanServer_NoServersIT to fallback to tablet servers 
(#5600)
0fac8775e5 is described below

commit 0fac8775e525d6ab77b9fd4ee9c7b1fab2c18c86
Author: Keith Turner <ktur...@apache.org>
AuthorDate: Fri May 30 17:05:39 2025 -0400

    fixes ScanServer_NoServersIT to fallback to tablet servers (#5600)
    
    Two test in ScanServer_NoServersIT expected scans to fallback to tablet
    servers when not scan servers were present.  However the configuration
    was not correct.  Modified the test to use correct config to cause
    expected behavior.
---
 .../accumulo/test/ScanServer_NoServersIT.java      | 28 ++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)

diff --git 
a/test/src/main/java/org/apache/accumulo/test/ScanServer_NoServersIT.java 
b/test/src/main/java/org/apache/accumulo/test/ScanServer_NoServersIT.java
index 2163a006eb..18005ef9b7 100644
--- a/test/src/main/java/org/apache/accumulo/test/ScanServer_NoServersIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/ScanServer_NoServersIT.java
@@ -187,7 +187,19 @@ public class ScanServer_NoServersIT extends 
SharedMiniClusterBase {
 
   @Test
   public void testScanWithTabletAvailabilityMix() throws Exception {
-    try (AccumuloClient client = 
Accumulo.newClient().from(getClientProps()).build()) {
+
+    // create client config that sets timeToWaitForScanServers to zero so that 
tserver fallback is
+    // immediate when no scan servers are present.
+    var clientProps = new Properties();
+    clientProps.putAll(getClientProps());
+    String scanServerSelectorProfiles = 
"[{'isDefault':true,'maxBusyTimeout':'5m',"
+        + "'busyTimeoutMultiplier':8, 'scanTypeActivations':[], 
'timeToWaitForScanServers':'0s',"
+        + "'attemptPlans':[{'servers':'3', 'busyTimeout':'1s'}]}]";
+    clientProps.put("scan.server.selector.impl", 
ConfigurableScanServerSelector.class.getName());
+    clientProps.put("scan.server.selector.opts.profiles",
+        scanServerSelectorProfiles.replace("'", "\""));
+
+    try (AccumuloClient client = 
Accumulo.newClient().from(clientProps).build()) {
       String tableName = getUniqueNames(1)[0];
 
       setupTableWithTabletAvailabilityMix(client, tableName);
@@ -215,7 +227,19 @@ public class ScanServer_NoServersIT extends 
SharedMiniClusterBase {
 
   @Test
   public void testBatchScanWithTabletAvailabilityMix() throws Exception {
-    try (AccumuloClient client = 
Accumulo.newClient().from(getClientProps()).build()) {
+
+    // create client config that sets timeToWaitForScanServers to zero so that 
tserver fallback is
+    // immediate when no scan servers are present.
+    var clientProps = new Properties();
+    clientProps.putAll(getClientProps());
+    String scanServerSelectorProfiles = 
"[{'isDefault':true,'maxBusyTimeout':'5m',"
+        + "'busyTimeoutMultiplier':8, 'scanTypeActivations':[], 
'timeToWaitForScanServers':'0s',"
+        + "'attemptPlans':[{'servers':'3', 'busyTimeout':'1s'}]}]";
+    clientProps.put("scan.server.selector.impl", 
ConfigurableScanServerSelector.class.getName());
+    clientProps.put("scan.server.selector.opts.profiles",
+        scanServerSelectorProfiles.replace("'", "\""));
+
+    try (AccumuloClient client = 
Accumulo.newClient().from(clientProps).build()) {
       final String tableName = getUniqueNames(1)[0];
 
       setupTableWithTabletAvailabilityMix(client, tableName);

Reply via email to