Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
91daba50
Commit
91daba50
authored
Feb 05, 2019
by
Hans Kuder
Committed by
Marc Gravell
Feb 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove obsolete responseTimeout setting (#1042)
* Remove obsolete responseTimeout setting * fix bad autocomplete
parent
ec5ba309
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
ConfigurationOptions.cs
src/StackExchange.Redis/ConfigurationOptions.cs
+4
-1
Deprecated.cs
tests/StackExchange.Redis.Tests/Deprecated.cs
+12
-0
No files found.
src/StackExchange.Redis/ConfigurationOptions.cs
View file @
91daba50
...
...
@@ -335,7 +335,8 @@ public bool PreserveAsyncOrder
/// Specifies the time in milliseconds that the system should allow for responses before concluding that the socket is unhealthy
/// (defaults to SyncTimeout)
/// </summary>
public
int
ResponseTimeout
{
get
{
return
responseTimeout
??
SyncTimeout
;
}
set
{
responseTimeout
=
value
;
}
}
[
Obsolete
(
"This setting no longer has any effect, and should not be used"
)]
public
int
ResponseTimeout
{
get
{
return
0
;
}
set
{
}
}
/// <summary>
/// The service name used to resolve a service via sentinel.
...
...
@@ -701,7 +702,9 @@ private void DoParse(string configuration, bool ignoreUnknown)
Proxy
=
OptionKeys
.
ParseProxy
(
key
,
value
);
break
;
case
OptionKeys
.
ResponseTimeout
:
#pragma warning disable CS0618 // Type or member is obsolete
ResponseTimeout
=
OptionKeys
.
ParseInt32
(
key
,
value
,
minValue
:
1
);
#pragma warning restore CS0618 // Type or member is obsolete
break
;
case
OptionKeys
.
DefaultDatabase
:
DefaultDatabase
=
OptionKeys
.
ParseInt32
(
key
,
value
);
...
...
tests/StackExchange.Redis.Tests/Deprecated.cs
View file @
91daba50
...
...
@@ -40,6 +40,18 @@ public void WriteBufferParse()
options
=
ConfigurationOptions
.
Parse
(
"writeBuffer=8092"
);
Assert
.
Equal
(
0
,
options
.
WriteBuffer
);
}
[
Fact
]
public
void
ResponseTimeout
()
{
Assert
.
True
(
Attribute
.
IsDefined
(
typeof
(
ConfigurationOptions
).
GetProperty
(
nameof
(
ConfigurationOptions
.
ResponseTimeout
)),
typeof
(
ObsoleteAttribute
)));
var
options
=
ConfigurationOptions
.
Parse
(
"name=Hello"
);
Assert
.
Equal
(
0
,
options
.
ResponseTimeout
);
options
=
ConfigurationOptions
.
Parse
(
"responseTimeout=1000"
);
Assert
.
Equal
(
0
,
options
.
ResponseTimeout
);
}
#pragma warning restore CS0618 // Type or member is obsolete
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment