File tree Expand file tree Collapse file tree 3 files changed +32
-1
lines changed
contract-tests/src/bin/sse-test-api Expand file tree Collapse file tree 3 files changed +32
-1
lines changed Original file line number Diff line number Diff line change 1
1
TEMP_TEST_OUTPUT =/tmp/contract-test-service.log
2
- SKIPFLAGS = -skip 'basic parsing' -skip 'HTTP behavior' -skip 'reconnection'
2
+ SKIPFLAGS = -skip 'reconnection' -skip 'basic parsing/ID field is ignored if it contains a null' -skip 'basic parsing/last ID persists if not overridden by later event' \
3
+ -skip 'HTTP behavior/client follows 301 redirect' -skip 'HTTP behavior/client follows 307 redirect'
4
+
3
5
4
6
build-contract-tests :
5
7
@cargo build
Original file line number Diff line number Diff line change @@ -32,6 +32,19 @@ struct Config {
32
32
/// property if the test service has the "headers" capability. Header names can be assumed
33
33
/// to all be lowercase.
34
34
headers : Option < HashMap < String , String > > ,
35
+ /// An optional integer specifying the read timeout for the connection, in
36
+ /// milliseconds.
37
+ read_timeout_ms : Option < u64 > ,
38
+ /// An optional string which should be sent as the Last-Event-Id header in the initial
39
+ /// HTTP request. The test harness will only set this property if the test service has the
40
+ /// "last-event-id" capability.
41
+ last_event_id : Option < String > ,
42
+ /// A string specifying an HTTP method to use instead of GET. The test harness will only
43
+ /// set this property if the test service has the "post" or "report" capability.
44
+ method : Option < String > ,
45
+ /// A string specifying data to be sent in the HTTP request body. The test harness will
46
+ /// only set this property if the test service has the "post" or "report" capability.
47
+ body : Option < String > ,
35
48
}
36
49
37
50
#[ derive( Serialize , Debug ) ]
Original file line number Diff line number Diff line change @@ -98,6 +98,22 @@ impl Inner {
98
98
reconnect_options = reconnect_options. delay ( Duration :: from_millis ( delay_ms) ) ;
99
99
}
100
100
101
+ if let Some ( read_timeout_ms) = config. read_timeout_ms {
102
+ client_builder = client_builder. read_timeout ( Duration :: from_millis ( read_timeout_ms) ) ;
103
+ }
104
+
105
+ if let Some ( last_event_id) = & config. last_event_id {
106
+ client_builder = client_builder. last_event_id ( last_event_id. clone ( ) ) ;
107
+ }
108
+
109
+ if let Some ( method) = & config. method {
110
+ client_builder = client_builder. method ( method. to_string ( ) ) ;
111
+ }
112
+
113
+ if let Some ( body) = & config. body {
114
+ client_builder = client_builder. body ( body. to_string ( ) ) ;
115
+ }
116
+
101
117
if let Some ( headers) = & config. headers {
102
118
for ( name, value) in headers {
103
119
client_builder = match client_builder. header ( name, value) {
You can’t perform that action at this time.
0 commit comments