Skip to content

Commit f38cbe3

Browse files
committed
GetVersion is not journaled in journal_test because there are two recorders.
1 parent c8db0fc commit f38cbe3

File tree

3 files changed

+5
-19
lines changed

3 files changed

+5
-19
lines changed

journal/player_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ TEST_F(PlayerTest, PlayTiny) {
8484
while (player.Play(count)) {
8585
++count;
8686
}
87-
EXPECT_EQ(3, count);
87+
EXPECT_EQ(2, count);
8888
}
8989

9090
TEST_F(PlayerTest, DISABLED_SECULAR_Benchmarks) {

journal/recorder.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ void Recorder::Activate(not_null<Recorder*> const recorder) {
4141

4242
// When the recorder gets activated, pretend that we got a GetVersion call.
4343
// This will record the version at the beginning of the journal, which is
44-
// useful for forensics.
44+
// useful for forensics. Note that this call doesn't register in the tests of
45+
// the `journal` project, because there we have two `active_recorder`s, the
46+
// one from the test and the one from the DLL.
4547
char const* build_date;
4648
char const* version;
4749
char const* platform;

journal/recorder_test.cpp

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -89,24 +89,8 @@ TEST_F(RecorderTest, Recording) {
8989

9090
std::vector<serialization::Method> const methods =
9191
ReadAll(test_name_ + ".journal.hex");
92-
EXPECT_EQ(6, methods.size());
92+
EXPECT_EQ(4, methods.size());
9393
auto it = methods.begin();
94-
{
95-
EXPECT_TRUE(it->HasExtension(serialization::GetVersion::extension));
96-
auto const& extension =
97-
it->GetExtension(serialization::GetVersion::extension);
98-
EXPECT_FALSE(extension.has_out());
99-
}
100-
++it;
101-
{
102-
EXPECT_TRUE(it->HasExtension(serialization::GetVersion::extension));
103-
auto const& extension =
104-
it->GetExtension(serialization::GetVersion::extension);
105-
EXPECT_TRUE(extension.has_out());
106-
EXPECT_EQ(BuildDate, extension.out().build_date());
107-
EXPECT_EQ(Version, extension.out().version());
108-
}
109-
++it;
11094
{
11195
EXPECT_TRUE(it->HasExtension(serialization::DeletePlugin::extension));
11296
auto const& extension =

0 commit comments

Comments
 (0)