Skip to content

Commit

Permalink
Reverted sandbox clientOptions changes, refactored opts param
Browse files Browse the repository at this point in the history
  • Loading branch information
sacOO7 committed Aug 15, 2024
1 parent d240ee3 commit d368039
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ablytest/sandbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,13 @@ func (app *Sandbox) Options(opts ...ably.ClientOption) []ably.ClientOption {
Hijack(http.RoundTripper) http.RoundTripper
}
appHTTPClient := NewHTTPClient()
appOpts := []ably.ClientOption{
ably.WithKey(app.Key()),
ably.WithEnvironment(app.Environment),
ably.WithUseBinaryProtocol(!NoBinaryProtocol),
ably.WithHTTPClient(appHTTPClient),
ably.WithLogLevel(DefaultLogLevel),
}

// If opts want to record round trips inject the recording transport
// via TransportHijacker interface.
Expand All @@ -240,13 +247,6 @@ func (app *Sandbox) Options(opts ...ably.ClientOption) []ably.ClientOption {
opts = append(opts, ably.WithHTTPClient(appHTTPClient))
}
}

appOpts := []ably.ClientOption{
ably.WithKey(app.Key()),
ably.WithEnvironment(app.Environment),
ably.WithUseBinaryProtocol(!NoBinaryProtocol),
ably.WithLogLevel(DefaultLogLevel),
}
appOpts = MergeOptions(appOpts, opts)

return appOpts
Expand Down

0 comments on commit d368039

Please sign in to comment.