Skip to content

Commit

Permalink
Fix changres
Browse files Browse the repository at this point in the history
  • Loading branch information
hmanukyanVMw committed Oct 2, 2023
1 parent 06a010e commit 272a5d3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/internal/acceptance/metric-store/metric_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ scrape_configs:
},
)

time.Sleep(time.Millisecond * 100)
time.Sleep(time.Second)
value, err := makeInstantQuery(tc, testInstantQuery{
Query: "metric_name",
TimeInSeconds: transform.MillisecondsToString(firstTimeMilliseconds + 1000),
Expand Down Expand Up @@ -689,7 +689,7 @@ scrape_configs:
},
},
)
time.Sleep(time.Millisecond * 100)
time.Sleep(time.Second)
value, err := makeInstantQuery(tc, testInstantQuery{
Query: MAGIC_MEASUREMENT_PEER_NAME,
TimeInSeconds: transform.MillisecondsToString(firstTimeMilliseconds + 1000),
Expand Down Expand Up @@ -735,7 +735,7 @@ scrape_configs:
},
)

time.Sleep(time.Millisecond * 100)
time.Sleep(time.Second)
value, err := makeInstantQuery(tc, testInstantQuery{
Query: "metric_name_for_node_0+metric_name_for_node_1",
TimeInSeconds: transform.MillisecondsToString(firstTimeMilliseconds + 1000),
Expand Down Expand Up @@ -798,7 +798,7 @@ scrape_configs:
},
)

time.Sleep(time.Millisecond * 100)
time.Sleep(time.Second)
value, err := makeRangeQuery(tc, testRangeQuery{
Query: "metric_name",
StartInSeconds: transform.MillisecondsToString(firstTimeMilliseconds + 1000),
Expand Down Expand Up @@ -849,7 +849,7 @@ scrape_configs:
},
)

time.Sleep(time.Millisecond * 100)
time.Sleep(time.Second)
value, err := makeRangeQuery(tc, testRangeQuery{
Query: "metric_name_for_node_1",
StartInSeconds: transform.MillisecondsToString(firstTimeMilliseconds),
Expand Down Expand Up @@ -908,7 +908,7 @@ scrape_configs:
},
)

time.Sleep(time.Millisecond * 100)
time.Sleep(time.Second)
value, err := makeRangeQuery(tc, testRangeQuery{
Query: "metric_name_for_node_0 + metric_name_for_node_1",
StartInSeconds: transform.MillisecondsToString(firstTimeMilliseconds + 1000),
Expand Down Expand Up @@ -1045,7 +1045,7 @@ scrape_configs:
},
)

time.Sleep(time.Millisecond * 100)
time.Sleep(time.Second)
value, err := makeSeriesQuery(tc, testSeriesQuery{
Match: []string{"metric_name"},
StartInSeconds: transform.MillisecondsToString(firstTimeMilliseconds),
Expand Down Expand Up @@ -1122,7 +1122,7 @@ scrape_configs:
},
)

time.Sleep(time.Millisecond * 100)
time.Sleep(time.Second)
value, err := makeSeriesQuery(tc, testSeriesQuery{
Match: []string{"metric_name_for_node_0", "metric_name_for_node_1"},
StartInSeconds: transform.MillisecondsToString(firstTimeMilliseconds),
Expand Down
4 changes: 3 additions & 1 deletion src/internal/metric-store/metric_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import (

"github.com/influxdata/influxql"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/gomega"
prom_api_client "github.com/prometheus/client_golang/api/prometheus/v1"
"github.com/prometheus/client_golang/prometheus"
config_util "github.com/prometheus/common/config"
Expand Down Expand Up @@ -334,7 +336,7 @@ var _ = Describe("MetricStore", func() {
{Timestamp: now.Add(2 * time.Second).UnixNano(), Name: MAGIC_MEASUREMENT_PEER_NAME},
})
tc.peer.Resume()
time.Sleep(time.Millisecond * 500)
time.Sleep(time.Second)

Eventually(tc.peer.GetInternodePoints).Should(HaveLen(2))
Expect(tc.peer.GetInternodePoints()[0].Timestamp).To(Equal(now.Add(time.Second).UnixNano()))
Expand Down

0 comments on commit 272a5d3

Please sign in to comment.