You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/01/22 16:33:25 UTC

[GitHub] [lucene-solr-operator] HoustonPutman commented on a change in pull request #197: Wait for another reconcile request to fix flaky test in CI

HoustonPutman commented on a change in pull request #197:
URL: https://github.com/apache/lucene-solr-operator/pull/197#discussion_r562752902



##########
File path: controllers/solrprometheusexporter_controller_test.go
##########
@@ -656,10 +657,14 @@ 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 2x
 	g.Eventually(requests, timeout).Should(gomega.Receive(gomega.Equal(expectedMetricsRequest)))
+	g.Eventually(requests, timeout).Should(gomega.Receive(gomega.Equal(expectedMetricsRequest)))
+

Review comment:
       In the [solrxml test](https://github.com/apache/lucene-solr-operator/blob/main/controllers/solrcloud_controller_test.go#L772), we added a 250 ms sleep to make sure it passed consistently. Might make sense to have here as well.

##########
File path: controllers/solrprometheusexporter_controller_test.go
##########
@@ -656,10 +657,14 @@ 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 2x
 	g.Eventually(requests, timeout).Should(gomega.Receive(gomega.Equal(expectedMetricsRequest)))
+	g.Eventually(requests, timeout).Should(gomega.Receive(gomega.Equal(expectedMetricsRequest)))
+
+	deployment = &appsv1.Deployment{}
+	err = testClient.Get(context.TODO(), metricsDKey, deployment)
+	g.Expect(err).NotTo(gomega.HaveOccurred())
 
-	deployment = expectDeployment(t, g, requests, expectedMetricsRequest, metricsDKey, userProvidedConfigMap.Name)

Review comment:
       Was `expectDeployment` not giving you the updated deployment?




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org