File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
src/WebJobs.Script/Description/CSharp
test/WebJobs.Script.Tests Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ public override bool Equals(object obj)
111
111
112
112
public override int GetHashCode ( )
113
113
{
114
- return string . Join ( "<>" , _parameters . Select ( p=> GetParameterIdentityString ( p ) ) )
114
+ return string . Join ( "<>" , _parameters . Select ( p => GetParameterIdentityString ( p ) ) )
115
115
. GetHashCode ( ) ;
116
116
}
117
117
Original file line number Diff line number Diff line change @@ -90,9 +90,27 @@ public TestFixture()
90
90
HttpServer server = new HttpServer ( config ) ;
91
91
this . Client = new HttpClient ( server ) ;
92
92
this . Client . BaseAddress = new Uri ( "https://localhost/" ) ;
93
+
94
+ WaitForHost ( ) ;
93
95
}
94
96
95
97
public HttpClient Client { get ; set ; }
98
+
99
+ private void WaitForHost ( )
100
+ {
101
+ TestHelpers . Await ( ( ) =>
102
+ {
103
+ return IsHostRunning ( ) ;
104
+ } ) . Wait ( ) ;
105
+ }
106
+
107
+ private bool IsHostRunning ( )
108
+ {
109
+ HttpRequestMessage request = new HttpRequestMessage ( HttpMethod . Get , string . Empty ) ;
110
+
111
+ HttpResponseMessage response = this . Client . SendAsync ( request ) . Result ;
112
+ return response . StatusCode == HttpStatusCode . NoContent ;
113
+ }
96
114
}
97
115
}
98
116
}
You can’t perform that action at this time.
0 commit comments