Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
f19b44a9
"tests/vscode:/vscode.git/clone" did not exist on "cf5f000d218fbcbc4bf404de8ed9d9607a128c3b"
Unverified
Commit
f19b44a9
authored
Aug 22, 2025
by
Waël Boukhobza
Committed by
GitHub
Aug 22, 2025
Browse files
fix: handle missing span_name in logging test assertions (#2665)
parent
0bd4995d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
12 deletions
+24
-12
lib/runtime/src/logging.rs
lib/runtime/src/logging.rs
+24
-12
No files found.
lib/runtime/src/logging.rs
View file @
f19b44a9
...
...
@@ -1009,30 +1009,42 @@ pub mod tests {
// Parent span has no parent_id
for
log_line
in
&
lines
{
if
log_line
.get
(
"span_name"
)
.unwrap
()
.as_str
()
.unwrap
()
==
"parent"
{
if
let
Some
(
span_name
)
=
log_line
.get
(
"span_name"
)
{
if
let
Some
(
span_name_str
)
=
span_name
.as_str
()
{
if
span_name_str
==
"parent"
{
assert
!
(
log_line
.get
(
"parent_id"
)
.is_none
());
}
}
}
}
// Child span's parent_id is parent_span_id
for
log_line
in
&
lines
{
if
log_line
.get
(
"span_name"
)
.unwrap
()
.as_str
()
.unwrap
()
==
"child"
{
if
let
Some
(
span_name
)
=
log_line
.get
(
"span_name"
)
{
if
let
Some
(
span_name_str
)
=
span_name
.as_str
()
{
if
span_name_str
==
"child"
{
assert_eq!
(
log_line
.get
(
"parent_id"
)
.unwrap
()
.as_str
()
.unwrap
(),
&
parent_span_id
);
}
}
}
}
// Grandchild span's parent_id is child_span_id
for
log_line
in
&
lines
{
if
log_line
.get
(
"span_name"
)
.unwrap
()
.as_str
()
.unwrap
()
==
"grandchild"
{
if
let
Some
(
span_name
)
=
log_line
.get
(
"span_name"
)
{
if
let
Some
(
span_name_str
)
=
span_name
.as_str
()
{
if
span_name_str
==
"grandchild"
{
assert_eq!
(
log_line
.get
(
"parent_id"
)
.unwrap
()
.as_str
()
.unwrap
(),
&
child_span_id
);
}
}
}
}
// Validate duration relationships
let
parent_duration
=
lines
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment