Skip to content

Commit

Permalink
disable index cleaner job and sleep for a while
Browse files Browse the repository at this point in the history
Signed-off-by: Jeeva Kandasamy <jkandasa@gmail.com>
  • Loading branch information
jkandasa committed Dec 9, 2020
1 parent b8b6d8b commit abd1f0e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion test/e2e/elasticsearch_index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,16 @@ func (suite *ElasticSearchIndexTestSuite) turnOnEsIndexCleaner(jaegerInstance *v
// disable index cleaner job
suite.updateJaegerCR(jaegerInstance, indexCleanerNumOfDays, false)

// seeing inconsistency in minikube when immediately disabling and enabling index cleaner job
// as a result index clear job is not triggering, so sleep for a while
time.Sleep(time.Second * 5)

// delete completed job pods
err = fw.KubeClient.CoreV1().Pods(namespace).DeleteCollection(
context.Background(),
metav1.DeleteOptions{},
metav1.ListOptions{LabelSelector: "app.kubernetes.io/component=cronjob-es-index-cleaner"})
require.NoError(t, err, "Error on delete index cleaner pods")

}

// function to update jaeger CR
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/utils_cr.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package e2e

import (
v1 "github.com/jaegertracing/jaeger-operator/pkg/apis/jaegertracing/v1"
"github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

v1 "github.com/jaegertracing/jaeger-operator/pkg/apis/jaegertracing/v1"
)

func updateOtelImages(jaegerInstance *v1.Jaeger) {
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/utils_elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ import (
"net/http"
"strconv"

v1 "github.com/jaegertracing/jaeger-operator/pkg/apis/jaegertracing/v1"
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/require"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/tools/portforward"

v1 "github.com/jaegertracing/jaeger-operator/pkg/apis/jaegertracing/v1"
)

// EsIndex struct to map indices data from es rest api response
Expand Down

0 comments on commit abd1f0e

Please sign in to comment.