Skip to content

Commit

Permalink
removed grpc.WithBlock method
Browse files Browse the repository at this point in the history
  • Loading branch information
abjeni committed Jan 7, 2025
1 parent 3ac26b1 commit a7ea2c7
Show file tree
Hide file tree
Showing 14 changed files with 1 addition and 17 deletions.
2 changes: 1 addition & 1 deletion channel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func TestChannelUnsuccessfulConnection(t *testing.T) {
t.Fatal("the node was not added to the configuration")
}
if node.conn == nil {
t.Fatal("connection should not be nil when NOT using WithBlock()")
t.Fatal("connection should not be nil")
}
}

Expand Down
1 change: 0 additions & 1 deletion cmd/benchmark/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ func main() {

mgrOpts := []gorums.ManagerOption{
gorums.WithGrpcDialOptions(
grpc.WithBlock(),
grpc.WithTransportCredentials(insecure.NewCredentials()),
),
gorums.WithDialTimeout(10 * time.Second),
Expand Down
2 changes: 0 additions & 2 deletions doc/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ func ExampleStorageClient() {
mgr := NewManager(
gorums.WithDialTimeout(500*time.Millisecond),
gorums.WithGrpcDialOptions(
grpc.WithBlock(),
grpc.WithTransportCredentials(insecure.NewCredentials()),
),
)
Expand Down Expand Up @@ -406,7 +405,6 @@ func ExampleStorageClient() {
mgr := NewManager(
gorums.WithDialTimeout(50*time.Millisecond),
gorums.WithGrpcDialOptions(
grpc.WithBlock(),
grpc.WithTransportCredentials(insecure.NewCredentials()),
),
)
Expand Down
1 change: 0 additions & 1 deletion examples/storage/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ func runClient(addresses []string) {
mgr := proto.NewManager(
gorums.WithDialTimeout(1*time.Second),
gorums.WithGrpcDialOptions(
grpc.WithBlock(), // block until connections are made
grpc.WithTransportCredentials(insecure.NewCredentials()), // disable TLS
),
)
Expand Down
1 change: 0 additions & 1 deletion mgr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ func TestManagerAddNodeWithConn(t *testing.T) {
mgr := gorums.NewRawManager(
gorums.WithDialTimeout(100*time.Millisecond),
gorums.WithGrpcDialOptions(
grpc.WithBlock(),
grpc.WithTransportCredentials(insecure.NewCredentials()),
),
)
Expand Down
1 change: 0 additions & 1 deletion rpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ func gorumsTestMgr() *dummy.Manager {
mgr := dummy.NewManager(
gorums.WithDialTimeout(time.Second),
gorums.WithGrpcDialOptions(
grpc.WithBlock(),
grpc.WithTransportCredentials(insecure.NewCredentials()),
),
)
Expand Down
1 change: 0 additions & 1 deletion server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ func TestServerCallback(t *testing.T) {
gorums.WithDialTimeout(time.Second),
gorums.WithMetadata(md),
gorums.WithGrpcDialOptions(
grpc.WithBlock(),
grpc.WithTransportCredentials(insecure.NewCredentials()),
),
)
Expand Down
1 change: 0 additions & 1 deletion tests/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ func TestConfig(t *testing.T) {
mgr := NewManager(
gorums.WithDialTimeout(100*time.Millisecond),
gorums.WithGrpcDialOptions(
grpc.WithBlock(),
grpc.WithTransportCredentials(insecure.NewCredentials()),
),
)
Expand Down
1 change: 0 additions & 1 deletion tests/correctable/correctable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ func run(t *testing.T, n int, div int, corr func(context.Context, *Configuration
mgr := NewManager(
gorums.WithDialTimeout(time.Second),
gorums.WithGrpcDialOptions(
grpc.WithBlock(),
grpc.WithTransportCredentials(insecure.NewCredentials()),
),
)
Expand Down
3 changes: 0 additions & 3 deletions tests/metadata/metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ func TestMetadata(t *testing.T) {
gorums.WithMetadata(md),
gorums.WithDialTimeout(time.Second),
gorums.WithGrpcDialOptions(
grpc.WithBlock(),
grpc.WithTransportCredentials(insecure.NewCredentials()),
),
)
Expand Down Expand Up @@ -97,7 +96,6 @@ func TestPerNodeMetadata(t *testing.T) {
gorums.WithPerNodeMetadata(perNodeMD),
gorums.WithDialTimeout(time.Second),
gorums.WithGrpcDialOptions(
grpc.WithBlock(),
grpc.WithTransportCredentials(insecure.NewCredentials()),
),
)
Expand Down Expand Up @@ -125,7 +123,6 @@ func TestCanGetPeerInfo(t *testing.T) {
mgr := NewManager(
gorums.WithDialTimeout(time.Second),
gorums.WithGrpcDialOptions(
grpc.WithBlock(),
grpc.WithTransportCredentials(insecure.NewCredentials()),
),
)
Expand Down
1 change: 0 additions & 1 deletion tests/oneway/oneway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ func setup(t testing.TB, cfgSize int) (cfg *oneway.Configuration, srvs []*oneway
mgr := oneway.NewManager(
gorums.WithDialTimeout(100*time.Millisecond),
gorums.WithGrpcDialOptions(
grpc.WithBlock(),
grpc.WithTransportCredentials(insecure.NewCredentials()),
),
)
Expand Down
1 change: 0 additions & 1 deletion tests/ordering/order_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ func setup(t *testing.T, cfgSize int) (cfg *Configuration, teardown func()) {
mgr := NewManager(
gorums.WithDialTimeout(100*time.Millisecond),
gorums.WithGrpcDialOptions(
grpc.WithBlock(),
grpc.WithTransportCredentials(insecure.NewCredentials()),
),
)
Expand Down
1 change: 0 additions & 1 deletion tests/tls/tls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ func TestTLS(t *testing.T) {
mgr := NewManager(
gorums.WithDialTimeout(100*time.Millisecond),
gorums.WithGrpcDialOptions(
grpc.WithBlock(),
grpc.WithTransportCredentials(credentials.NewClientTLSFromCert(cp, "")),
grpc.WithReturnConnectionError(),
),
Expand Down
1 change: 0 additions & 1 deletion tests/unresponsive/unreponsive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ func TestUnresponsive(t *testing.T) {
mgr := NewManager(
gorums.WithDialTimeout(100*time.Millisecond),
gorums.WithGrpcDialOptions(
grpc.WithBlock(),
grpc.WithTransportCredentials(insecure.NewCredentials()),
),
)
Expand Down

0 comments on commit a7ea2c7

Please sign in to comment.