[ 
https://issues.apache.org/jira/browse/BEAM-13870?focusedWorklogId=726928&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-726928
 ]

ASF GitHub Bot logged work on BEAM-13870:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 15/Feb/22 10:09
            Start Date: 15/Feb/22 10:09
    Worklog Time Spent: 10m 
      Work Description: daria-malkova commented on a change in pull request 
#16826:
URL: https://github.com/apache/beam/pull/16826#discussion_r806661190



##########
File path: playground/backend/internal/cache/local/local_cache_test.go
##########
@@ -540,3 +608,36 @@ func TestLocalCache_clearItems(t *testing.T) {
                })
        }
 }
+
+func TestNew(t *testing.T) {
+       items := make(map[uuid.UUID]map[cache.SubKey]interface{})
+       pipelinesExpiration := make(map[uuid.UUID]time.Time)
+       type args struct {
+               ctx context.Context
+       }
+       tests := []struct {
+               name string
+               args args
+               want *Cache
+       }{
+               {
+                       // Test case with calling New method.

Review comment:
       Redundant

##########
File path: playground/backend/internal/cache/local/local_cache_test.go
##########
@@ -429,6 +487,16 @@ func TestLocalCache_startGC(t *testing.T) {
                                pipelinesExpiration: preparedExpMap,
                        },
                },
+               {
+                       // Test case with calling startGC method with nil items.
+                       // As a result, items stay the same.
+                       name: "Checking for deleting expired pipelines with nil 
items",

Review comment:
       Not clear

##########
File path: playground/backend/internal/cache/redis/redis_cache_test.go
##########
@@ -243,6 +243,23 @@ func TestRedisCache_SetValue(t *testing.T) {
                        },
                        wantErr: false,
                },
+               {
+                       // Test case with calling SetValue method with 
incorrect value.

Review comment:
       Redundant

##########
File path: playground/backend/internal/cache/local/local_cache_test.go
##########
@@ -191,12 +230,31 @@ func TestLocalCache_SetExpTime(t *testing.T) {
                expTime    time.Duration
        }
        tests := []struct {
-               name   string
-               fields fields
-               args   args
+               name    string
+               fields  fields
+               args    args
+               wantErr bool
        }{
                {
+                       // Test case with calling SetExpTime method with 
pipelineId and his expiration time.

Review comment:
       Redundant

##########
File path: playground/backend/internal/cache/redis/redis_cache_test.go
##########
@@ -535,6 +555,28 @@ func Test_unmarshalBySubKey(t *testing.T) {
                        want:    output,
                        wantErr: false,
                },
+               {
+                       // Test case with calling unmarshalBySubKey method with 
Canceled subKey.
+                       // As a result, want to receive false.

Review comment:
       Why it will be false?




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 726928)
    Time Spent: 40m  (was: 0.5h)

> [Playground] Increase test coverage for the cache package
> ---------------------------------------------------------
>
>                 Key: BEAM-13870
>                 URL: https://issues.apache.org/jira/browse/BEAM-13870
>             Project: Beam
>          Issue Type: Sub-task
>          Components: beam-playground
>            Reporter: Aydar Zaynutdinov
>            Assignee: Pavel Avilov
>            Priority: P3
>              Labels: beam-playground-backend
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Need to add unit tests to increase test coverage for the _cache_ package



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to