Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix functional tests error message #698

Merged
merged 2 commits into from
Apr 11, 2024

Conversation

nelsitoPuglisi
Copy link
Contributor

@nelsitoPuglisi nelsitoPuglisi commented Apr 11, 2024

Goal

Display the observed array when a functional test fails.

Previous message showing the expected array:

JSON validation failure reason: Array element not found in observed array: {"attributes":[{"key":"emb.session_id","value":"EMBRACE_TEST_IGNORE"},{"key":"emb.type","value":"ux.session"},{"key":"emb.private","value":"true"}],"events":"EMBRACE_TEST_IGNORE","name":"emb-session","span_id":"EMBRACE_TEST_IGNORE","start_time_unix_nano":"EMBRACE_TEST_IGNORE","status":"Unset","trace_id":"EMBRACE_TEST_IGNORE"}

New message showing the observed array:

Array element not found in observed array: {"trace_id":"2501394e59d5c219b11ef229e45260d6","span_id":"b6c8bf1e0c66ce41","name":"emb-session","start_time_unix_nano":1712840730495000000,"status":"Unset","events":[],"attributes":[{"key":"emb.session_id","value":"55D1F122D0E640CE866016F59F50A4A6"},{"key":"emb.type","value":"ux.session"}]}.Match failed for key: span_snapshots. Match failed for key: data.`

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @nelsitoPuglisi and the rest of your teammates on Graphite Graphite

@nelsitoPuglisi nelsitoPuglisi changed the title inver order of arrays and rename properly Fix functional tests error message Apr 11, 2024
@nelsitoPuglisi nelsitoPuglisi marked this pull request as ready for review April 11, 2024 13:09
@nelsitoPuglisi nelsitoPuglisi requested a review from a team as a code owner April 11, 2024 13:09
found = true
}
}
if (!found) {
sb.append("Array element not found in observed array: $array1Entry.")
sb.append("Array element not found in observed array: $observedEntry.")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I inverted the order to have access to the observedEntry.

Copy link

codecov bot commented Apr 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.92%. Comparing base (4edd4c6) to head (bb8f49f).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #698      +/-   ##
==========================================
+ Coverage   79.91%   79.92%   +0.01%     
==========================================
  Files         423      423              
  Lines       11180    11180              
  Branches     1693     1693              
==========================================
+ Hits         8934     8936       +2     
+ Misses       1542     1541       -1     
+ Partials      704      703       -1     

see 1 file with indirect coverage changes

Copy link
Contributor

@leandro-godon leandro-godon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@nelsitoPuglisi nelsitoPuglisi merged commit e72e752 into master Apr 11, 2024
4 checks passed
@nelsitoPuglisi nelsitoPuglisi deleted the nelson/fix-functional-tests-message branch April 11, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants