Skip to content

Commit

Permalink
GOCBC-1402: Add missing timeout values to wan development config profile
Browse files Browse the repository at this point in the history
Change-Id: Idd6192c14a61c9129e570255fc4cb9a22a6fb5e2
Reviewed-on: https://review.couchbase.org/c/gocb/+/189570
Reviewed-by: Dimitris Christodoulou <[email protected]>
Tested-by: Charles Dixon <[email protected]>
  • Loading branch information
chvck committed Apr 13, 2023
1 parent 378b636 commit 0719217
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ var developmentProfile = ClusterOptions{
KVTimeout: 20 * time.Second,
ConnectTimeout: 20 * time.Second,
KVDurableTimeout: 20 * time.Second,
KVScanTimeout: 20 * time.Second,
ViewTimeout: 120 * time.Second,
AnalyticsTimeout: 120 * time.Second,
SearchTimeout: 120 * time.Second,
ManagementTimeout: 120 * time.Second,
QueryTimeout: 120 * time.Second,
},
}

Expand Down
4 changes: 4 additions & 0 deletions config_profile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ var defaultConfig = ClusterOptions{
KVTimeout: 2500 * time.Millisecond,
ConnectTimeout: 10 * time.Second,
KVDurableTimeout: 10 * time.Second,
KVScanTimeout: 10 * time.Second,
ViewTimeout: 75 * time.Second,
AnalyticsTimeout: 75 * time.Second,
SearchTimeout: 75 * time.Second,
ManagementTimeout: 75 * time.Second,
QueryTimeout: 75 * time.Second,
},
Transcoder: NewJSONTranscoder(),
Tracer: NewThresholdLoggingTracer(nil),
Expand All @@ -32,10 +34,12 @@ func (suite *UnitTestSuite) TestDevelopmentConfigProfile() {
suite.Assert().Equal(20*time.Second, options.TimeoutsConfig.KVTimeout)
suite.Assert().Equal(20*time.Second, options.TimeoutsConfig.ConnectTimeout)
suite.Assert().Equal(20*time.Second, options.TimeoutsConfig.KVDurableTimeout)
suite.Assert().Equal(20*time.Second, options.TimeoutsConfig.KVScanTimeout)
suite.Assert().Equal(120*time.Second, options.TimeoutsConfig.ViewTimeout)
suite.Assert().Equal(120*time.Second, options.TimeoutsConfig.AnalyticsTimeout)
suite.Assert().Equal(120*time.Second, options.TimeoutsConfig.SearchTimeout)
suite.Assert().Equal(120*time.Second, options.TimeoutsConfig.ManagementTimeout)
suite.Assert().Equal(120*time.Second, options.TimeoutsConfig.QueryTimeout)
}

func (suite *UnitTestSuite) TestUnknownConfigProfile() {
Expand Down

0 comments on commit 0719217

Please sign in to comment.