Skip to content

Commit

Permalink
Fix checking channel
Browse files Browse the repository at this point in the history
Signed-off-by: Wenqi Qiu <[email protected]>
  • Loading branch information
wenqiq committed Mar 21, 2024
1 parent b39ad49 commit 07daa09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/performance/framework/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func ScaleService(ctx context.Context, ch chan time.Duration, data *ScaleData) (
defer func() {
res.err = err
for {
if len(ch) == res.scaleNum {
if len(ch) == cap(ch) {
break
}
klog.InfoS("Waiting the check goroutine finish")
Expand Down Expand Up @@ -205,7 +205,7 @@ func scaleUp(ctx context.Context, data *ScaleData, ch chan time.Duration) (svcs
var err error
var clientPod *corev1.Pod
svc.Spec.ClusterIP = clusterIP.String()
klog.InfoS("go FetchTimestampFromLog", "cap(ch)", cap(ch))
klog.InfoS("go FetchTimestampFromLog", "cap(ch)", cap(ch), "len(ch)", len(ch))
fromPod := &podList.Items[testPodIndex%len(podList.Items)]
testPodIndex++
clientPod, err = workload_pod.CreateClientPod(ctx, cs, fromPod.Namespace, fromPod.Name, []string{fmt.Sprintf("%s:%d", clusterIP, 80)}, workload_pod.ScaleTestPodProbeContainerName)
Expand Down

0 comments on commit 07daa09

Please sign in to comment.