<p dir="auto">The UT <code class="notranslate">RemoteTaskRunnerTest.testRunPendingTaskFailToAssignTask</code> failed in <a href="https://app.travis-ci.com/github/apache/druid/jobs/578832603" rel="nofollow">this build</a>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ERROR] Tests run: 29, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 72.402 s &lt;&lt;&lt; FAILURE! - in org.apache.druid.indexing.overlord.RemoteTaskRunnerTest
[ERROR] org.apache.druid.indexing.overlord.RemoteTaskRunnerTest.testRunPendingTaskFailToAssignTask  Time elapsed: 0.271 s  &lt;&lt;&lt; ERROR!
java.util.concurrent.TimeoutException: Timeout waiting for task.
	at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:269)
	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:96)
	at org.apache.druid.indexing.overlord.RemoteTaskRunnerTest.testRunPendingTaskFailToAssignTask(RemoteTaskRunnerTest.java:576)"><pre lang="text" class="notranslate"><code class="notranslate">[ERROR] Tests run: 29, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 72.402 s &lt;&lt;&lt; FAILURE! - in org.apache.druid.indexing.overlord.RemoteTaskRunnerTest
[ERROR] org.apache.druid.indexing.overlord.RemoteTaskRunnerTest.testRunPendingTaskFailToAssignTask  Time elapsed: 0.271 s  &lt;&lt;&lt; ERROR!
java.util.concurrent.TimeoutException: Timeout waiting for task.
	at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:269)
	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:96)
	at org.apache.druid.indexing.overlord.RemoteTaskRunnerTest.testRunPendingTaskFailToAssignTask(RemoteTaskRunnerTest.java:576)
</code></pre></div>
<p dir="auto">It is evidently known that this test is flaky:</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="  // higher timeout to reduce flakiness on CI pipeline"><pre class="notranslate">  <span class="pl-c">// higher timeout to reduce flakiness on CI pipeline</span></pre></div>
<p dir="auto">The same test passes when run on a Mac in the IDE. The test passed in earlier builds on Travis in this branch. The branch in question changed only SQL classes, but nothing in the Overlord. Conclusion: flaky test.</p>
<p dir="auto">I used the unified console to create a Kafka Indexing supervisor and have been adding custom configurations in the consumer properties that include the bootstrap servers and a custom deserializer, which has worked flawlessly until I added another property (auto.offset.reset).  When I look at the resulting log files, I see that the auto.offset.reset property is, in fact in my ingestSpec, but is not passed on to the Kafka consumer properties.  My setting is 'earliest' and the consumer properties shows 'none'.</p>
<p dir="auto">I have inspected org.apache.druid.indexing.kafka.KafkaConsumerConfigs and found that the probably culprit is that 'auto.offset.reset' is hard-coded.  Perhaps the simplest fix might be to remove the hard-coded setting here, but maybe I am missing something:</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/*
 * 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
 * &quot;License&quot;); 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
 * &quot;AS IS&quot; 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.druid.indexing.kafka;

import org.apache.druid.indexing.common.task.utils.RandomIdUtils;
import org.apache.druid.java.util.common.StringUtils;

import java.util.HashMap;
import java.util.Map;

/**
 * Common place to keep all kafka consumer configs
 */
public class KafkaConsumerConfigs
{

  public static Map&lt;String, Object&gt; getConsumerProperties()
  {
    final Map&lt;String, Object&gt; props = new HashMap&lt;&gt;();
    props.put(&quot;metadata.max.age.ms&quot;, &quot;10000&quot;);
    props.put(&quot;group.id&quot;, StringUtils.format(&quot;kafka-supervisor-%s&quot;, RandomIdUtils.getRandomId()));
    props.put(&quot;auto.offset.reset&quot;, &quot;none&quot;);
    props.put(&quot;enable.auto.commit&quot;, &quot;false&quot;);
    props.put(&quot;isolation.level&quot;, &quot;read_committed&quot;);
    return props;
  }

}"><pre class="notranslate"><span class="pl-c">/*</span>
<span class="pl-c"> * Licensed to the Apache Software Foundation (ASF) under one</span>
<span class="pl-c"> * or more contributor license agreements.  See the NOTICE file</span>
<span class="pl-c"> * distributed with this work for additional information</span>
<span class="pl-c"> * regarding copyright ownership.  The ASF licenses this file</span>
<span class="pl-c"> * to you under the Apache License, Version 2.0 (the</span>
<span class="pl-c"> * "License"); you may not use this file except in compliance</span>
<span class="pl-c"> * with the License.  You may obtain a copy of the License at</span>
<span class="pl-c"> *</span>
<span class="pl-c"> *   http://www.apache.org/licenses/LICENSE-2.0</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * Unless required by applicable law or agreed to in writing,</span>
<span class="pl-c"> * software distributed under the License is distributed on an</span>
<span class="pl-c"> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span>
<span class="pl-c"> * KIND, either express or implied.  See the License for the</span>
<span class="pl-c"> * specific language governing permissions and limitations</span>
<span class="pl-c"> * under the License.</span>
<span class="pl-c"> */</span>

<span class="pl-k">package</span> <span class="pl-s1">org</span>.<span class="pl-s1">apache</span>.<span class="pl-s1">druid</span>.<span class="pl-s1">indexing</span>.<span class="pl-s1">kafka</span>;

<span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">apache</span>.<span class="pl-s1">druid</span>.<span class="pl-s1">indexing</span>.<span class="pl-s1">common</span>.<span class="pl-s1">task</span>.<span class="pl-s1">utils</span>.<span class="pl-s1">RandomIdUtils</span>;
<span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">apache</span>.<span class="pl-s1">druid</span>.<span class="pl-s1">java</span>.<span class="pl-s1">util</span>.<span class="pl-s1">common</span>.<span class="pl-s1">StringUtils</span>;

<span class="pl-k">import</span> <span class="pl-s1">java</span>.<span class="pl-s1">util</span>.<span class="pl-s1">HashMap</span>;
<span class="pl-k">import</span> <span class="pl-s1">java</span>.<span class="pl-s1">util</span>.<span class="pl-s1">Map</span>;

<span class="pl-c">/**</span>
<span class="pl-c"> * Common place to keep all kafka consumer configs</span>
<span class="pl-c"> */</span>
<span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">KafkaConsumerConfigs</span>
{

  <span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-smi">Map</span>&lt;<span class="pl-smi">String</span>, <span class="pl-smi">Object</span>&gt; <span class="pl-en">getConsumerProperties</span>()
  {
    <span class="pl-k">final</span> <span class="pl-smi">Map</span>&lt;<span class="pl-smi">String</span>, <span class="pl-smi">Object</span>&gt; <span class="pl-s1">props</span> = <span class="pl-k">new</span> <span class="pl-smi">HashMap</span>&lt;&gt;();
    <span class="pl-s1">props</span>.<span class="pl-en">put</span>(<span class="pl-s">"metadata.max.age.ms"</span>, <span class="pl-s">"10000"</span>);
    <span class="pl-s1">props</span>.<span class="pl-en">put</span>(<span class="pl-s">"group.id"</span>, <span class="pl-smi">StringUtils</span>.<span class="pl-en">format</span>(<span class="pl-s">"kafka-supervisor-%s"</span>, <span class="pl-smi">RandomIdUtils</span>.<span class="pl-en">getRandomId</span>()));
    <span class="pl-s1">props</span>.<span class="pl-en">put</span>(<span class="pl-s">"auto.offset.reset"</span>, <span class="pl-s">"none"</span>);
    <span class="pl-s1">props</span>.<span class="pl-en">put</span>(<span class="pl-s">"enable.auto.commit"</span>, <span class="pl-s">"false"</span>);
    <span class="pl-s1">props</span>.<span class="pl-en">put</span>(<span class="pl-s">"isolation.level"</span>, <span class="pl-s">"read_committed"</span>);
    <span class="pl-k">return</span> <span class="pl-s1">props</span>;
  }

}</pre></div>