Skip to content

Commit

Permalink
Fix timestamp
Browse files Browse the repository at this point in the history
Signed-off-by: Wenqi Qiu <[email protected]>
  • Loading branch information
wenqiq committed Feb 27, 2024
1 parent 79a8667 commit 9f40a28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
8 changes: 2 additions & 6 deletions test/performance/framework/service/scale_up.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,6 @@ func ScaleUp(ctx context.Context, provider providers.ProviderInterface, controlP
klog.InfoS("retrieveCIDRs", "svcCIDRs", svcCIDRs)
svcCIDRIPv4 = svcCIDRs[0]
_, ipNet, _ := net.ParseCIDR(svcCIDRIPv4)
// var parsedIPs []net.IP
// for _, ip := range reservedIPs {
// parsedIPs = append(parsedIPs, net.ParseIP(ip))
// }
allocator, err := ipallocator.NewCIDRAllocator(ipNet, []net.IP{net.ParseIP("10.96.0.1"), net.ParseIP("10.96.0.10")})

for _, ns := range nss {
Expand All @@ -152,7 +148,7 @@ func ScaleUp(ctx context.Context, provider providers.ProviderInterface, controlP
}

var fromPod *corev1.Pod
if testPodIndex < len(podList.Items) {
if testPodIndex < len(podList.Items) && actualCheckNum < cap(ch) {
fromPod = &podList.Items[testPodIndex]
testPodIndex++

Expand All @@ -166,7 +162,7 @@ func ScaleUp(ctx context.Context, provider providers.ProviderInterface, controlP
var newSvc *corev1.Service
var err error
svc.Spec.ClusterIP = clusterIP.String()
startTimeStamp := time.Now().Nanosecond()
startTimeStamp := time.Now().UnixNano()
newSvc, err = cs.CoreV1().Services(ns).Create(ctx, svc, metav1.CreateOptions{})
if err != nil {
if errors.IsAlreadyExists(err) {
Expand Down
1 change: 0 additions & 1 deletion test/performance/utils/exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ func TestExtractSeconds(t *testing.T) {
}
fmt.Println(res)
}

}

0 comments on commit 9f40a28

Please sign in to comment.