From 864cdf3a1df2e7cade0f2664e7884b566599ccfa Mon Sep 17 00:00:00 2001 From: Umputun Date: Sun, 10 Jun 2018 00:52:36 -0500 Subject: [PATCH] faster test --- app/store/service/service_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/store/service/service_test.go b/app/store/service/service_test.go index 1e019afa..4bdd2d02 100644 --- a/app/store/service/service_test.go +++ b/app/store/service/service_test.go @@ -189,7 +189,7 @@ func TestService_VoteConcurrent(t *testing.T) { // concurrent vote +1 as multiple users for the same comment var wg sync.WaitGroup - for i := 0; i < 1000; i++ { + for i := 0; i < 100; i++ { wg.Add(1) i := i go func() { @@ -200,8 +200,8 @@ func TestService_VoteConcurrent(t *testing.T) { wg.Wait() res, err = b.Last("radio-t", 0) require.NoError(t, err) - assert.Equal(t, 1000, res[0].Score, "should have 1000 score") - assert.Equal(t, 1000, len(res[0].Votes), "should have 1000 votes") + assert.Equal(t, 100, res[0].Score, "should have 1000 score") + assert.Equal(t, 100, len(res[0].Votes), "should have 1000 votes") } func TestService_Pin(t *testing.T) {