-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow grpc's MaxMsgRecvSize to be set via a config (#291)
* add ability to set MaxRecvMsgSize via config, #2305 Signed-off-by: sriv <[email protected]> * bump version -> 4.2.0 Signed-off-by: sriv <[email protected]> * update gh actions and go versions Signed-off-by: sriv <[email protected]> Signed-off-by: sriv <[email protected]>
- Loading branch information
Showing
7 changed files
with
52 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package env | ||
|
||
import "testing" | ||
|
||
func TestMaxRecvMsgSize(t *testing.T) { | ||
t.Run("empty value should return default", func(t *testing.T) { | ||
t.Setenv(gaugeMaxMessageSize, "") | ||
v := GetMaxMessageSize() | ||
if v != 1024 { | ||
t.Errorf("Expected 1024, got %d", v) | ||
} | ||
}) | ||
|
||
t.Run("non-numeric should return default", func(t *testing.T) { | ||
t.Setenv(gaugeMaxMessageSize, "abcd") | ||
v := GetMaxMessageSize() | ||
if v != 1024 { | ||
t.Errorf("Expected 1024, got %d", v) | ||
} | ||
}) | ||
|
||
t.Run("numeric should return set value", func(t *testing.T) { | ||
t.Setenv(gaugeMaxMessageSize, "2048") | ||
v := GetMaxMessageSize() | ||
if v != 2048 { | ||
t.Errorf("Expected 2048, got %d", v) | ||
} | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,5 +28,5 @@ | |
"scope": [ | ||
"Execution" | ||
], | ||
"version": "4.1.5" | ||
"version": "4.2.0" | ||
} |