@@ -71,11 +71,12 @@ TEST_F(LiveBlockingTests, TestSubscribe) {
71
71
constexpr auto kTsOut = false ;
72
72
constexpr auto kDataset = dataset::kXnasItch ;
73
73
const std::vector<std::string> kSymbols {" MSFT" , " TSLA" , " QQQ" };
74
- constexpr auto kSchema = Schema::Ohlcv1M;
75
- constexpr auto kSType = SType::RawSymbol;
74
+ const auto kSchema = Schema::Ohlcv1M;
75
+ const auto kSType = SType::RawSymbol;
76
76
77
77
const mock::MockLsgServer mock_server{
78
- kDataset , kTsOut , [&kSymbols ](mock::MockLsgServer& self) {
78
+ kDataset , kTsOut ,
79
+ [&kSymbols , kSchema , kSType ](mock::MockLsgServer& self) {
79
80
self.Accept ();
80
81
self.Authenticate ();
81
82
self.Subscribe (kSymbols , kSchema , kSType );
@@ -94,13 +95,14 @@ TEST_F(LiveBlockingTests, TestSubscribe) {
94
95
TEST_F (LiveBlockingTests, TestSubscriptionChunking) {
95
96
constexpr auto kTsOut = false ;
96
97
constexpr auto kDataset = dataset::kXnasItch ;
97
- constexpr auto kSymbol = " TEST" ;
98
- constexpr std::size_t kSymbolCount = 1000 ;
99
- constexpr auto kSchema = Schema::Ohlcv1M;
100
- constexpr auto kSType = SType::RawSymbol;
98
+ const auto kSymbol = " TEST" ;
99
+ const std::size_t kSymbolCount = 1000 ;
100
+ const auto kSchema = Schema::Ohlcv1M;
101
+ const auto kSType = SType::RawSymbol;
101
102
102
103
const mock::MockLsgServer mock_server{
103
- kDataset , kTsOut , [](mock::MockLsgServer& self) {
104
+ kDataset , kTsOut ,
105
+ [kSymbol , kSymbolCount , kSchema , kSType ](mock::MockLsgServer& self) {
104
106
self.Accept ();
105
107
self.Authenticate ();
106
108
std::size_t i{};
@@ -126,10 +128,10 @@ TEST_F(LiveBlockingTests, TestSubscriptionChunking) {
126
128
127
129
TEST_F (LiveBlockingTests, TestNextRecord) {
128
130
constexpr auto kTsOut = false ;
129
- constexpr auto kRecCount = 12 ;
131
+ const auto kRecCount = 12 ;
130
132
constexpr OhlcvMsg kRec {DummyHeader<OhlcvMsg>(RType::Ohlcv1M), 1 , 2 , 3 , 4 , 5 };
131
133
const mock::MockLsgServer mock_server{
132
- dataset::kXnasItch , kTsOut , [kRec ](mock::MockLsgServer& self) {
134
+ dataset::kXnasItch , kTsOut , [kRec , kRecCount ](mock::MockLsgServer& self) {
133
135
self.Accept ();
134
136
self.Authenticate ();
135
137
for (size_t i = 0 ; i < kRecCount ; ++i) {
@@ -264,7 +266,7 @@ TEST_F(LiveBlockingTests, TestNextRecordPartialRead) {
264
266
}
265
267
266
268
TEST_F (LiveBlockingTests, TestNextRecordWithTsOut) {
267
- constexpr auto kRecCount = 5 ;
269
+ const auto kRecCount = 5 ;
268
270
constexpr auto kTsOut = true ;
269
271
const WithTsOut<TradeMsg> send_rec{
270
272
{DummyHeader<TradeMsg>(RType::Mbp0),
@@ -279,7 +281,8 @@ TEST_F(LiveBlockingTests, TestNextRecordWithTsOut) {
279
281
2 },
280
282
UnixNanos{std::chrono::seconds{1678910279000000000 }}};
281
283
const mock::MockLsgServer mock_server{
282
- dataset::kXnasItch , kTsOut , [send_rec](mock::MockLsgServer& self) {
284
+ dataset::kXnasItch , kTsOut ,
285
+ [send_rec, kRecCount ](mock::MockLsgServer& self) {
283
286
self.Accept ();
284
287
self.Authenticate ();
285
288
for (size_t i = 0 ; i < kRecCount ; ++i) {
@@ -331,7 +334,7 @@ TEST_F(LiveBlockingTests, TestStop) {
331
334
static_cast <::ssize_t >(rec_str.size ())) {
332
335
}
333
336
}} // namespace test
334
- }; // namespace databento
337
+ }; // namespace databento
335
338
336
339
LiveBlocking target{
337
340
logger_.get (), kKey , dataset::kXnasItch , kLocalhost ,
0 commit comments