File tree Expand file tree Collapse file tree 2 files changed +23
-15
lines changed
RabbitMQ.Client/src/client/impl Expand file tree Collapse file tree 2 files changed +23
-15
lines changed Original file line number Diff line number Diff line change @@ -987,19 +987,21 @@ public void Open(bool insist)
987
987
988
988
// FIXME: check that PLAIN is supported.
989
989
// FIXME: parse out locales properly!
990
- ConnectionTuneDetails connectionTune = default ( ConnectionTuneDetails ) ;
991
- try
992
- {
993
- connectionTune =
994
- m_model0 . ConnectionStartOk ( m_clientProperties ,
995
- "PLAIN" ,
996
- Encoding . UTF8 . GetBytes ( "\0 " + m_factory . UserName +
997
- "\0 " + m_factory . Password ) ,
998
- "en_US" ) ;
999
- }
1000
- catch ( OperationInterruptedException e )
1001
- {
1002
- throw new PossibleAuthenticationFailureException ( "Possibly caused by authentication failure" , e ) ;
990
+ ConnectionTuneDetails connectionTune = default ( ConnectionTuneDetails ) ;
991
+ try
992
+ {
993
+ connectionTune =
994
+ m_model0 . ConnectionStartOk ( m_clientProperties ,
995
+ "PLAIN" ,
996
+ Encoding . UTF8 . GetBytes (
997
+ "\0 " + m_factory . UserName +
998
+ "\0 " + m_factory . Password ) ,
999
+ "en_US" ) ;
1000
+ }
1001
+ catch ( OperationInterruptedException e )
1002
+ {
1003
+ throw new PossibleAuthenticationFailureException (
1004
+ "Possibly caused by authentication failure" , e ) ;
1003
1005
}
1004
1006
1005
1007
ushort channelMax = ( ushort ) NegotiatedMaxValue ( m_factory . RequestedChannelMax ,
Original file line number Diff line number Diff line change @@ -88,8 +88,14 @@ public void TestAuthFailure()
88
88
{
89
89
foreach ( Object failureReason in bue . ConnectionErrors . Values )
90
90
{
91
- Assert . IsInstanceOfType ( typeof ( PossibleAuthenticationFailureException ) , failureReason ) ;
92
- Assert . That ( ( ( PossibleAuthenticationFailureException ) failureReason ) . Message . ToLower ( ) . Contains ( "auth" ) ) ;
91
+ Assert . IsInstanceOfType (
92
+ typeof ( PossibleAuthenticationFailureException ) ,
93
+ failureReason ) ;
94
+ Assert . That (
95
+ ( ( PossibleAuthenticationFailureException ) failureReason )
96
+ . Message
97
+ . ToLower ( )
98
+ . Contains ( "auth" ) ) ;
93
99
}
94
100
}
95
101
}
You can’t perform that action at this time.
0 commit comments