Skip to content

Commit fc3eded

Browse files
bretambroseBret Ambrose
and
Bret Ambrose
authored
Update for event loop API changes (#491)
Co-authored-by: Bret Ambrose <[email protected]>
1 parent f3eef14 commit fc3eded

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

tests/test_connection.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@
1010

1111
#include <aws/common/clock.h>
1212
#include <aws/common/condition_variable.h>
13-
#include <aws/common/log_writer.h>
13+
#include <aws/common/hash_table.h>
1414
#include <aws/common/logging.h>
1515
#include <aws/common/string.h>
1616
#include <aws/common/thread.h>
17-
#include <aws/common/uuid.h>
1817
#include <aws/io/channel_bootstrap.h>
1918
#include <aws/io/event_loop.h>
20-
#include <aws/io/logging.h>
2119
#include <aws/io/socket.h>
2220
#include <aws/io/tls_channel_handler.h>
2321
#include <aws/testing/aws_test_harness.h>

tests/test_connection_manager.c

+5-10
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,6 @@ static void s_cm_tester_on_cm_shutdown_complete(void *user_data) {
134134
aws_mutex_unlock(&tester->lock);
135135
}
136136

137-
static struct aws_event_loop *s_new_event_loop(
138-
struct aws_allocator *alloc,
139-
const struct aws_event_loop_options *options,
140-
void *new_loop_user_data) {
141-
(void)new_loop_user_data;
142-
143-
return aws_event_loop_new_default(alloc, options->clock);
144-
}
145-
146137
static int s_cm_tester_init(struct cm_tester_options *options) {
147138
struct cm_tester *tester = &s_tester;
148139

@@ -170,7 +161,11 @@ static int s_cm_tester_init(struct cm_tester_options *options) {
170161
clock_fn = options->mock_table->aws_high_res_clock_get_ticks;
171162
}
172163

173-
tester->event_loop_group = aws_event_loop_group_new(tester->allocator, clock_fn, 1, s_new_event_loop, NULL, NULL);
164+
struct aws_event_loop_group_options elg_options = {
165+
.loop_count = 1,
166+
.clock_override = clock_fn,
167+
};
168+
tester->event_loop_group = aws_event_loop_group_new(tester->allocator, &elg_options);
174169

175170
struct aws_host_resolver_default_options resolver_options = {
176171
.el_group = tester->event_loop_group,

0 commit comments

Comments
 (0)