Envoy 成功原因之一是有严格的项目质量流程控制。如要实现一个新特性或扩展,必须编写组件整合测试用例。本文以 transport_sockets.tcp_stats
扩展的测试实现为例,说明 Envoy 的 integration test 架构。
Integration test 设计
Debugging integration test
build
|
|
lldb
check local var in stack
expr &server
(Envoy::Server::InstanceImpl *) $9 = 0x00007ffff73e10b8
memory region 0x00007ffff73e10b8
[0x00007ffff6be6000-0x00007ffff73e6000) rw-
Address Perm Offset Device Inode Size KernelPageSize MMUPageSize Rss Pss Shared_Clean Shared_Dirty Private_Clean Private_Dirty Referenced Anonymous LazyFree AnonHugePages ShmemPmdMapped FilePmdMapped Shared_Hugetlb Private_Hugetlb Swap SwapPss Locked THPeligible VmFlags Mapping
7ffff6be6000 rw-p 00000000 00:00 0 8192 4 4 80 80 0 0 0 80 80 80 0 0 0 0 0 0 0 0 0 0 rd wr mr mw me ac sd
x $sp
0x7ffff73e0f70: b0 32 3e f7 ff 7f 00 00 20 37 3e f7 ff 7f 00 00 .2>..... 7>.....
0x7ffff73e0f80: 18 37 3e f7 ff 7f 00 00 a8 34 3e f7 ff 7f 00 00 .7>......4>.....
0x00007ffff73e0f70
expr example
expr listener->filter_chains()[0].filters()[0].typed_config().type_url()
test listener timeout
test/integration/base_integration_test.h
|
|