You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by th...@apache.org on 2021/01/22 17:23:28 UTC
[lucene-solr-operator] branch main updated: Wait for another
reconcile request to fix flaky test in CI (#197)
This is an automated email from the ASF dual-hosted git repository.
thelabdude pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene-solr-operator.git
The following commit(s) were added to refs/heads/main by this push:
new 05512ae Wait for another reconcile request to fix flaky test in CI (#197)
05512ae is described below
commit 05512aeeeaa81e41088bef426e09f4ad75d79896
Author: Timothy Potter <th...@gmail.com>
AuthorDate: Fri Jan 22 10:23:21 2021 -0700
Wait for another reconcile request to fix flaky test in CI (#197)
---
controllers/solrprometheusexporter_controller_test.go | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/controllers/solrprometheusexporter_controller_test.go b/controllers/solrprometheusexporter_controller_test.go
index f24fd19..81982cd 100644
--- a/controllers/solrprometheusexporter_controller_test.go
+++ b/controllers/solrprometheusexporter_controller_test.go
@@ -34,6 +34,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/reconcile"
"testing"
+ "time"
)
var _ reconcile.Reconciler = &SolrPrometheusExporterReconciler{}
@@ -656,8 +657,11 @@ func TestMetricsReconcileWithUserProvidedConfig(t *testing.T) {
updatedConfigXml := "<config>updated by user</config>"
updateUserProvidedConfigMap(testClient, g, userProvidedConfigMapNN, map[string]string{util.PrometheusExporterConfigMapKey: updatedConfigXml})
- // reconcile should happen again
+ // reconcile should happen again 3x
g.Eventually(requests, timeout).Should(gomega.Receive(gomega.Equal(expectedMetricsRequest)))
+ g.Eventually(requests, timeout).Should(gomega.Receive(gomega.Equal(expectedMetricsRequest)))
+ g.Eventually(requests, timeout).Should(gomega.Receive(gomega.Equal(expectedMetricsRequest)))
+ time.Sleep(time.Millisecond * 250)
deployment = expectDeployment(t, g, requests, expectedMetricsRequest, metricsDKey, userProvidedConfigMap.Name)
expectedAnnotations = map[string]string{