|
24 | 24 | #include <gtest/gtest.h> |
25 | 25 | #include "bthread/bthread.h" |
26 | 26 | #include "gperftools_helper.h" |
| 27 | +#include "butil/compiler_specific.h" |
27 | 28 | #include "butil/containers/doubly_buffered_data.h" |
28 | 29 | #include "brpc/describable.h" |
29 | 30 | #include "brpc/socket.h" |
@@ -1155,6 +1156,7 @@ TEST_F(LoadBalancerTest, revived_from_all_failed_sanity) { |
1155 | 1156 | } |
1156 | 1157 | } |
1157 | 1158 |
|
| 1159 | +#ifndef BUTIL_USE_ASAN |
1158 | 1160 | class EchoServiceImpl : public test::EchoService { |
1159 | 1161 | public: |
1160 | 1162 | EchoServiceImpl() |
@@ -1251,14 +1253,14 @@ TEST_F(LoadBalancerTest, revived_from_all_failed_intergrated) { |
1251 | 1253 | } |
1252 | 1254 |
|
1253 | 1255 | butil::EndPoint point(butil::IP_ANY, 7777); |
1254 | | - brpc::Server server; |
1255 | 1256 | EchoServiceImpl service; |
| 1257 | + brpc::Server server; |
1256 | 1258 | ASSERT_EQ(0, server.AddService(&service, brpc::SERVER_DOESNT_OWN_SERVICE)); |
1257 | 1259 | ASSERT_EQ(0, server.Start(point, NULL)); |
1258 | 1260 |
|
1259 | 1261 | butil::EndPoint point2(butil::IP_ANY, 7778); |
1260 | | - brpc::Server server2; |
1261 | 1262 | EchoServiceImpl service2; |
| 1263 | + brpc::Server server2; |
1262 | 1264 | ASSERT_EQ(0, server2.AddService(&service2, brpc::SERVER_DOESNT_OWN_SERVICE)); |
1263 | 1265 | ASSERT_EQ(0, server2.Start(point2, NULL)); |
1264 | 1266 |
|
@@ -1287,6 +1289,7 @@ TEST_F(LoadBalancerTest, revived_from_all_failed_intergrated) { |
1287 | 1289 | bthread_usleep(500000 /* sleep longer than timeout of channel */); |
1288 | 1290 | ASSERT_EQ(0, num_failed.load(butil::memory_order_relaxed)); |
1289 | 1291 | } |
| 1292 | +#endif // BUTIL_USE_ASAN |
1290 | 1293 |
|
1291 | 1294 | TEST_F(LoadBalancerTest, la_selection_too_long) { |
1292 | 1295 | brpc::GlobalInitializeOrDie(); |
|
0 commit comments