bisakhmondal commented on a change in pull request #1678:
URL: https://github.com/apache/apisix-dashboard/pull/1678#discussion_r602232948



##########
File path: api/test/e2enew/upstream/upstream_chash_query_string_arg_xxx_test.go
##########
@@ -197,7 +193,7 @@ var _ = ginkgo.Describe("Upstream chash query string", 
func() {
                        counts = append(counts, value)
                }
                sort.Ints(counts)
-               assert.True(t, float64(counts[2]-counts[0])/float64(counts[1]) 
< 0.4)
+               gomega.Expect(float64(counts[2]-counts[0])/float64(counts[1]) < 
0.4).Should(gomega.BeTrue())

Review comment:
       ```suggestion
                
gomega.Expect(float64(counts[2]-counts[0])/float64(counts[1])).Should(gomega.BeNumerically("<",
 0.4))
   ```
   what do you say?

##########
File path: api/test/e2enew/service/service_test.go
##########
@@ -139,12 +135,11 @@ var _ = ginkgo.Describe("create service without plugin", 
func() {
                })
        })
        ginkgo.It("batch test /server_port api", func() {
-               t := ginkgo.GinkgoT()
                time.Sleep(time.Duration(500) * time.Millisecond)
                res := base.BatchTestServerPort(18)
-               assert.True(t, res["1980"] == 3)
-               assert.True(t, res["1981"] == 6)
-               assert.True(t, res["1982"] == 9)
+               gomega.Expect(res["1980"] == 3).Should(gomega.BeTrue())
+               gomega.Expect(res["1981"] == 6).Should(gomega.BeTrue())
+               gomega.Expect(res["1982"] == 9).Should(gomega.BeTrue())

Review comment:
       Just a suggestion, you could also use
   `gomega.Expect(res["1980"]).Should(gomega.Equal(3))` here :)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to