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

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

                Author: ASF GitHub Bot
            Created on: 18/Feb/22 09:56
            Start Date: 18/Feb/22 09:56
    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_r809825401



##########
File path: playground/backend/internal/cache/local/local_cache_test.go
##########
@@ -103,6 +105,23 @@ func TestLocalCache_GetValue(t *testing.T) {
                        want:    nil,
                        wantErr: true,
                },
+               {
+                       // Test case with calling GetValue method with existing 
value that is expiring.

Review comment:
       Unuseful comment

##########
File path: playground/backend/internal/cache/local/local_cache_test.go
##########
@@ -191,12 +230,29 @@ 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
        }{
                {
                        name: "Set expiration time",
+                       fields: fields{
+                               cleanupInterval:     cleanupInterval,
+                               items:               preparedItems,
+                               pipelinesExpiration: 
make(map[uuid.UUID]time.Time),
+                       },
+                       args: args{
+                               ctx:        context.Background(),
+                               pipelineId: preparedId,
+                               expTime:    time.Minute,
+                       },
+                       wantErr: false,
+               },
+               {
+                       // Test case with calling SetExpTime method with 
pipelineId which not set in cache and expiration time.

Review comment:
       ditto

##########
File path: playground/backend/internal/cache/local/local_cache_test.go
##########
@@ -159,6 +178,23 @@ func TestLocalCache_SetValue(t *testing.T) {
                        },
                        wantErr: false,
                },
+               {
+                       // Test case with calling SetValue method with 
RunOutputIndex subKey.

Review comment:
       ditto

##########
File path: playground/backend/internal/cache/redis/redis_cache_test.go
##########
@@ -68,7 +68,7 @@ func TestRedisCache_GetValue(t *testing.T) {
                        wantErr: true,
                },
                {
-                       name: "all success",
+                       name: "get existing value",

Review comment:
       Sometimes you have a name with an upper case letter, but sometimes with 
lower case. Do the same everywhere




-- 
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: 729560)
    Time Spent: 1h 40m  (was: 1.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: 1h 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