@@ -126,6 +126,33 @@ TEST_F(LiveBlockingTests, TestSubscriptionChunkingUnixNanos) {
126126 target.Subscribe (kSymbols , kSchema , kSType );
127127}
128128
129+ TEST_F (LiveBlockingTests, TestSubscriptionUnixNanos0) {
130+ constexpr auto kTsOut = false ;
131+ constexpr auto kDataset = dataset::kXnasItch ;
132+ const std::vector<std::string> kSymbols = {" TEST1" , " TEST2" };
133+ const auto kSchema = Schema::Ohlcv1M;
134+ const auto kSType = SType::RawSymbol;
135+ const auto kStart = UnixNanos{};
136+
137+ const mock::MockLsgServer mock_server{
138+ kDataset , kTsOut ,
139+ [&kSymbols , kSchema , kSType , kStart ](mock::MockLsgServer& self) {
140+ self.Accept ();
141+ self.Authenticate ();
142+ std::size_t i{};
143+ self.Subscribe (kSymbols , kSchema , kSType , " 0" );
144+ }};
145+
146+ LiveBlocking target{logger_.get (),
147+ kKey ,
148+ kDataset ,
149+ kLocalhost ,
150+ mock_server.Port (),
151+ kTsOut ,
152+ VersionUpgradePolicy{}};
153+ target.Subscribe (kSymbols , kSchema , kSType , kStart );
154+ }
155+
129156TEST_F (LiveBlockingTests, TestSubscriptionChunkingStringStart) {
130157 constexpr auto kTsOut = false ;
131158 constexpr auto kDataset = dataset::kXnasItch ;
@@ -182,7 +209,7 @@ TEST_F(LiveBlockingTests, TestSubscribeSnapshot) {
182209 const auto chunk_size =
183210 std::min (static_cast <std::size_t >(128 ), kSymbolCount - i);
184211 const std::vector<std::string> symbols_chunk (chunk_size, kSymbol );
185- self.Subscribe (symbols_chunk, kSchema , kSType , kUseSnapshot );
212+ self.SubscribeWithSnapshot (symbols_chunk, kSchema , kSType );
186213 i += chunk_size;
187214 }
188215 }};
@@ -195,13 +222,13 @@ TEST_F(LiveBlockingTests, TestSubscribeSnapshot) {
195222 kTsOut ,
196223 VersionUpgradePolicy{}};
197224 const std::vector<std::string> kSymbols (kSymbolCount , kSymbol );
198- target.Subscribe (kSymbols , kSchema , kSType , kUseSnapshot );
225+ target.SubscribeWithSnapshot (kSymbols , kSchema , kSType );
199226}
200227
201228TEST_F (LiveBlockingTests, TestInvalidSubscription) {
202229 constexpr auto kTsOut = false ;
203230 constexpr auto kDataset = dataset::kXnasItch ;
204- const std::vector<std::string> noSymbols {};
231+ const std::vector<std::string> kNoSymbols {};
205232 const auto kSchema = Schema::Ohlcv1M;
206233 const auto kSType = SType::RawSymbol;
207234
@@ -219,7 +246,7 @@ TEST_F(LiveBlockingTests, TestInvalidSubscription) {
219246 kTsOut ,
220247 VersionUpgradePolicy{}};
221248
222- ASSERT_THROW (target.Subscribe (noSymbols , kSchema , kSType ),
249+ ASSERT_THROW (target.Subscribe (kNoSymbols , kSchema , kSType ),
223250 databento::InvalidArgumentError);
224251}
225252
0 commit comments