Skip to content

Commit 5fb3995

Browse files
authored
Merge pull request #33 from mpretty-cyro/fix/local-target-for-network-tests
Fix flaky network tests
2 parents 6c1d5d6 + 650dc3c commit 5fb3995

File tree

7 files changed

+349
-242
lines changed

7 files changed

+349
-242
lines changed

external/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ endif()
102102

103103
set(LIBQUIC_BUILD_TESTS OFF CACHE BOOL "")
104104
if(ENABLE_ONIONREQ)
105-
libsession_system_or_submodule(OXENQUIC quic liboxenquic>=1.2.0 oxen-libquic)
105+
libsession_system_or_submodule(OXENQUIC quic liboxenquic>=1.3.0 oxen-libquic)
106106
endif()
107107

108108
if(NOT TARGET oxenc::oxenc)

external/oxen-libquic

Submodule oxen-libquic updated 63 files

include/session/session_network.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ struct service_node : public oxen::quic::RemoteAddress {
8686
struct connection_info {
8787
service_node node;
8888
std::shared_ptr<size_t> pending_requests;
89-
std::shared_ptr<oxen::quic::connection_interface> conn;
89+
std::shared_ptr<oxen::quic::Connection> conn;
9090
std::shared_ptr<oxen::quic::BTRequestStream> stream;
9191

9292
bool is_valid() const { return conn && stream && !stream->is_closing(); };
@@ -204,10 +204,10 @@ class Network {
204204
std::thread disk_write_thread;
205205

206206
// General values
207-
bool destroyed = false;
208207
bool suspended = false;
209208
ConnectionStatus status;
210-
oxen::quic::Network net;
209+
210+
std::shared_ptr<oxen::quic::Loop> loop;
211211
std::shared_ptr<oxen::quic::Endpoint> endpoint;
212212
std::unordered_map<PathType, std::vector<onion_path>> paths;
213213
std::vector<std::pair<onion_path, PathType>> paths_pending_drop;
@@ -672,7 +672,7 @@ class Network {
672672
/// Outputs:
673673
/// - A tuple containing the status code, headers and body of the decrypted onion request
674674
/// response.
675-
std::tuple<
675+
virtual std::tuple<
676676
int16_t,
677677
std::vector<std::pair<std::string, std::string>>,
678678
std::optional<std::string>>
@@ -689,7 +689,7 @@ class Network {
689689
/// Outputs:
690690
/// - A tuple containing the status code, headers and body of the decrypted onion request
691691
/// response.
692-
std::tuple<
692+
virtual std::tuple<
693693
int16_t,
694694
std::vector<std::pair<std::string, std::string>>,
695695
std::optional<std::string>>

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ if(ENABLE_ONIONREQ)
118118
)
119119

120120
if (BUILD_STATIC_DEPS)
121-
target_include_directories(onionreq PRIVATE ${CMAKE_BINARY_DIR}/static-deps/include)
121+
target_include_directories(onionreq PUBLIC ${CMAKE_BINARY_DIR}/static-deps/include)
122122
endif()
123123
endif()
124124

src/session_network.cpp

Lines changed: 63 additions & 60 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)