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

Telematic Plugin: Available topic response return null value for topics field when there is no available topic #570

Closed
dan-du-car opened this issue Dec 7, 2023 · 0 comments
Labels
anomaly bug Something isn't working

Comments

@dan-du-car
Copy link
Collaborator

dan-du-car commented Dec 7, 2023

Summary

Available topic response return null value for topics field when there is no available topic. This cause issue with requester when it parses the response assuming the topics field is always an array.

Version

4.3.0 (Current)

Expected Behavior

Available topic response should return empty array if there is no topic.

Actual Behavior

Available topic response return null if there is no topic.

Steps to Reproduce the Actual Behavior

  1. Run v2xhub
  2. Run telematic tool
  3. enable telematic plugin
  4. Monitor the error output from the telematic server terminal

Related Work

#569

@dan-du-car dan-du-car added bug Something isn't working anomaly labels Dec 7, 2023
dan-du-car added a commit that referenced this issue Dec 7, 2023
…ld when there is no topic available (#569)

<!-- Thanks for the contribution, this is awesome. -->

# PR Details
## Description
Telematic bridge sends null topics when there is no topic available. The
idea value for this topics is empty array value [] rather than a null
value. This PR is to initialize the topics value with empty array
<!--- Describe your changes in detail -->

## Related Issue
#570
<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Please link to the issue here: -->

## Motivation and Context
telematic testing
<!--- Why is this change required? What problem does it solve? -->

## How Has This Been Tested?
Integration test
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [x] Defect fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that cause existing functionality
to change)

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

- [ ] I have added any new packages to the sonar-scanner.properties file
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the **CONTRIBUTING** document.
[V2XHUB Contributing
Guide](https://github.com/usdot-fhwa-OPS/V2X-Hub/blob/develop/Contributing.md)
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
anomaly bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant