Skip to content

Commit

Permalink
metadata plugin update statuses in wrapped langs
Browse files Browse the repository at this point in the history
  • Loading branch information
jtattermusch committed Nov 13, 2017
1 parent 5c7a097 commit 638c40c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public void MetadataCredentials_InterceptorThrows()
client = new TestService.TestServiceClient(channel);

var ex = Assert.Throws<RpcException>(() => client.UnaryCall(new SimpleRequest { }));
Assert.AreEqual(StatusCode.Unauthenticated, ex.Status.StatusCode);
Assert.AreEqual(StatusCode.Unavailable, ex.Status.StatusCode);
}

private class FakeTestService : TestService.TestServiceBase
Expand Down
4 changes: 2 additions & 2 deletions src/php/tests/unit_tests/CallCredentials2Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public function testCallbackWithInvalidKey()

$this->assertTrue($event->send_metadata);
$this->assertTrue($event->send_close);
$this->assertTrue($event->status->code == Grpc\STATUS_UNAUTHENTICATED);
$this->assertTrue($event->status->code == Grpc\STATUS_UNAVAILABLE);
}

public function invalidReturnCallbackFunc($context)
Expand Down Expand Up @@ -179,6 +179,6 @@ public function testCallbackWithInvalidReturnValue()

$this->assertTrue($event->send_metadata);
$this->assertTrue($event->send_close);
$this->assertTrue($event->status->code == Grpc\STATUS_UNAUTHENTICATED);
$this->assertTrue($event->status->code == Grpc\STATUS_UNAVAILABLE);
}
}
4 changes: 2 additions & 2 deletions src/ruby/spec/generic/client_stub_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def metadata_test(md)
th.join
end

it 'should receive UNAUTHENTICATED if call credentials plugin fails' do
it 'should receive UNAVAILABLE if call credentials plugin fails' do
server_port = create_secure_test_server
th = run_request_response(@sent_msg, @resp, @pass)

Expand All @@ -252,7 +252,7 @@ def metadata_test(md)
unauth_error_occured = false
begin
get_response(stub, credentials: creds)
rescue GRPC::Unauthenticated => e
rescue GRPC::Unavailable => e
unauth_error_occured = true
expect(e.details.include?(error_message)).to be true
end
Expand Down

0 comments on commit 638c40c

Please sign in to comment.