Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
f2876ea1
Commit
f2876ea1
authored
8 years ago
by
Craig Tiller
Browse files
Options
Downloads
Patches
Plain Diff
Up timeouts for poll-cv polling strategy, seems to make things more stable
parent
4c8172ed
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/core/util/test_config.c
+18
-3
18 additions, 3 deletions
test/core/util/test_config.c
test/core/util/test_config.h
+2
-1
2 additions, 1 deletion
test/core/util/test_config.h
with
20 additions
and
4 deletions
test/core/util/test_config.c
+
18
−
3
View file @
f2876ea1
...
...
@@ -33,14 +33,20 @@
#include
"test/core/util/test_config.h"
#include
<grpc/support/log.h>
#include
<signal.h>
#include
<stdbool.h>
#include
<stdio.h>
#include
<stdlib.h>
#include
<grpc/support/alloc.h>
#include
<grpc/support/log.h>
#include
"src/core/lib/iomgr/port.h"
#include
"src/core/lib/support/env.h"
#include
"src/core/lib/support/string.h"
double
g_fixture_slowdown_factor
=
1
.
0
;
double
g_poller_slowdown_factor
=
1
.
0
;
#if GPR_GETPID_IN_UNISTD_H
#include
<unistd.h>
...
...
@@ -274,9 +280,18 @@ static void install_crash_handler() {}
void
grpc_test_init
(
int
argc
,
char
**
argv
)
{
install_crash_handler
();
gpr_log
(
GPR_DEBUG
,
"test slowdown: machine=%f build=%f total=%f"
,
#ifdef GRPC_POSIX_SOCKET
{
/* poll-cv poll strategy runs much more slowly than anything else */
char
*
s
=
gpr_getenv
(
"GRPC_POLL_STRATEGY"
);
if
(
s
!=
NULL
&&
0
==
strcmp
(
s
,
"poll-cv"
))
{
g_poller_slowdown_factor
=
5
.
0
;
}
gpr_free
(
s
);
}
#endif
gpr_log
(
GPR_DEBUG
,
"test slowdown: machine=%f build=%f poll=%f total=%f"
,
(
double
)
GRPC_TEST_SLOWDOWN_MACHINE_FACTOR
,
(
double
)
GRPC_TEST_SLOWDOWN_BUILD_FACTOR
,
(
double
)
GRPC_TEST_SLOWDOWN_BUILD_FACTOR
,
g_poller_slowdown_factor
,
(
double
)
GRPC_TEST_SLOWDOWN_FACTOR
);
/* seed rng with pid, so we don't end up with the same random numbers as a
concurrently running test binary */
...
...
This diff is collapsed.
Click to expand it.
test/core/util/test_config.h
+
2
−
1
View file @
f2876ea1
...
...
@@ -49,10 +49,11 @@ extern "C" {
#endif
extern
double
g_fixture_slowdown_factor
;
extern
double
g_poller_slowdown_factor
;
#define GRPC_TEST_SLOWDOWN_FACTOR \
(GRPC_TEST_SLOWDOWN_BUILD_FACTOR * GRPC_TEST_SLOWDOWN_MACHINE_FACTOR * \
g_fixture_slowdown_factor)
g_fixture_slowdown_factor
* g_poller_slowdown_factor
)
#define GRPC_TIMEOUT_SECONDS_TO_DEADLINE(x) \
gpr_time_add( \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment