Skip to content

Commit 3ab4115

Browse files
committed
Evergreen improvements
1 parent 05612e1 commit 3ab4115

File tree

3 files changed

+29
-28
lines changed

3 files changed

+29
-28
lines changed

evergreen/evergreen.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ functions:
2929
setup-socks5-proxy:
3030
- command: shell.exec
3131
params:
32+
background: true
3233
script: |
3334
${PREPARE_SHELL}
35+
MONGODB_URI="${MONGODB_URI}"
3436
# Read the MongoDB URI connection string and extract an arbitrary member's host:port
3537
HOST_PORT=$(echo "$MONGODB_URI" | sed 's|mongodb://||' | cut -d',' -f1)
3638
37-
# Start the SOCKS5 proxy with authentication on port 1080
38-
python $DRIVERS_TOOLS/.evergreen/socks5srv.py --map "localhost:12345 to $HOST_PORT" --port 1080 --auth username:p4ssw0rd &
39-
40-
# Start the SOCKS5 proxy without authentication on port 1081
41-
python $DRIVERS_TOOLS/.evergreen/socks5srv.py --map "localhost:12345 to $HOST_PORT" --port 1081 &
39+
export MAP_ARG="localhost:12345 to $HOST_PORT"
40+
python3 $DRIVERS_TOOLS/.evergreen/socks5srv.py --map "$MAP_ARG" --port 1080 --auth username:p4ssw0rd &
41+
python3 $DRIVERS_TOOLS/.evergreen/socks5srv.py --map "$MAP_ARG" --port 1081
4242
4343
#//TODO Check if we need all those parameters...
4444
run-socks5-proxy-tests:
@@ -1172,8 +1172,8 @@ tasks:
11721172
#//TODO need to do the same with the other platforms
11731173
- name: test-socks5-proxy-net60
11741174
commands:
1175-
- func: setup-socks5-proxy
11761175
- func: bootstrap-mongo-orchestration
1176+
- func: setup-socks5-proxy
11771177
- func: run-socks5-proxy-tests
11781178
vars:
11791179
FRAMEWORK: net60

src/MongoDB.Driver/Core/Configuration/TcpStreamSettings.cs

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -68,27 +68,28 @@ public TcpStreamSettings(
6868
_socks5ProxySettings = socks5ProxySettings.WithDefault(null);
6969
}
7070

71-
// /// <summary>
72-
// ///
73-
// /// </summary>
74-
// /// <param name="addressFamily"></param>
75-
// /// <param name="connectTimeout"></param>
76-
// /// <param name="readTimeout"></param>
77-
// /// <param name="receiveBufferSize"></param>
78-
// /// <param name="sendBufferSize"></param>
79-
// /// <param name="socketConfigurator"></param>
80-
// /// <param name="writeTimeout"></param>
81-
// public TcpStreamSettings(
82-
// Optional<AddressFamily> addressFamily,
83-
// Optional<TimeSpan> connectTimeout,
84-
// Optional<TimeSpan?> readTimeout,
85-
// Optional<int> receiveBufferSize,
86-
// Optional<int> sendBufferSize,
87-
// Optional<Action<Socket>> socketConfigurator,
88-
// Optional<TimeSpan?> writeTimeout)
89-
// {
90-
//
91-
// }
71+
/// <summary>
72+
/// Initializes a new instance of the <see cref="TcpStreamSettings"/> class.
73+
/// </summary>
74+
/// <param name="addressFamily">The address family.</param>
75+
/// <param name="connectTimeout">The connect timeout.</param>
76+
/// <param name="readTimeout">The read timeout.</param>
77+
/// <param name="receiveBufferSize">Size of the receive buffer.</param>
78+
/// <param name="sendBufferSize">Size of the send buffer.</param>
79+
/// <param name="socketConfigurator">The socket configurator.</param>
80+
/// <param name="writeTimeout">The write timeout.</param>
81+
public TcpStreamSettings(
82+
Optional<AddressFamily> addressFamily,
83+
Optional<TimeSpan> connectTimeout,
84+
Optional<TimeSpan?> readTimeout,
85+
Optional<int> receiveBufferSize,
86+
Optional<int> sendBufferSize,
87+
Optional<Action<Socket>> socketConfigurator,
88+
Optional<TimeSpan?> writeTimeout)
89+
:this(addressFamily, connectTimeout, readTimeout, receiveBufferSize, sendBufferSize, socketConfigurator, writeTimeout, null)
90+
{
91+
92+
}
9293

9394
internal TcpStreamSettings(TcpStreamSettings other)
9495
{

tests/MongoDB.Driver.TestHelpers/Core/XunitExtensions/RequireServer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public RequireServer StorageEngines(params string[] storageEngines)
210210

211211
public RequireServer Tls(bool required = true)
212212
{
213-
var usingTls = CoreTestConfiguration.ConnectionString.Tls;
213+
var usingTls = CoreTestConfiguration.ConnectionString.Tls ?? false;
214214
if (usingTls == required)
215215
{
216216
return this;

0 commit comments

Comments
 (0)