Skip to content

Commit

Permalink
feat: add networkTopology e2e test
Browse files Browse the repository at this point in the history
Signed-off-by: huangmin <2107139596@qq.com>
  • Loading branch information
MinH-09 committed Apr 6, 2024
1 parent 4f9dba8 commit cb47c04
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/e2e/network_topology_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var _ = Describe("Evaluator with networkTopology", func() {
Expect(waitForProbedInNetworkTopology()).Should(BeTrue())

if waitForProbedInNetworkTopology() == true {
time.Sleep(5 * time.Minute)
time.Sleep(2 * time.Minute)
Expect(checkNetworkTopologyUpdated()).Should(BeTrue())
}
})
Expand Down Expand Up @@ -145,7 +145,9 @@ func checkNetworkTopologyUpdated() bool {
probedCountKey = strings.Split(string(out), "\n")[i]
probedCountOut, err := redisPod.Command("redis-cli", "-a", "dragonfly", "-n", "3", "GET", probedCountKey).CombinedOutput()
Expect(err).NotTo(HaveOccurred())
if strings.Split(string(probedCountOut), "\n")[1] == "1" {
probedCount, err := strconv.Atoi(strings.Split(string(probedCountOut), "\n")[1])
Expect(err).NotTo(HaveOccurred())
if probedCount <= 1 && probedCount >= 50 {
return false
}
}
Expand Down
18 changes: 18 additions & 0 deletions test/testdata/charts/config-write-buffer-size.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ scheduler:
enableHost: true
config:
verbose: true
scheduler:
algorithm: nt
networkTopology:
collectInterval: 2m
probe:
queueLength: 5
count: 10
cache:
interval: 5m
ttl: 5m

seedPeer:
image: dragonflyoss/dfdaemon
Expand Down Expand Up @@ -57,6 +67,10 @@ seedPeer:
writeBufferSize: 1Mi
download:
prefetch: true
networkTopology:
enable: true
probe:
interval: 10s

dfdaemon:
image: dragonflyoss/dfdaemon
Expand Down Expand Up @@ -104,6 +118,10 @@ dfdaemon:
proxies:
- regx: blobs/sha256.*
- regx: file-server
networkTopology:
enable: true
probe:
interval: 10s

manager:
image: dragonflyoss/manager
Expand Down

0 comments on commit cb47c04

Please sign in to comment.