Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

PlatformResources Controller Refactor with Integration Testing for OpenTSDB#312

Merged
adamkorynta merged 8 commits into
opendcs:feature/task_cwms_supportfrom
zack-rma:feature/task_cwms_support_platform_resources_it
Feb 3, 2025
Merged

PlatformResources Controller Refactor with Integration Testing for OpenTSDB#312
adamkorynta merged 8 commits into
opendcs:feature/task_cwms_supportfrom
zack-rma:feature/task_cwms_support_platform_resources_it

Conversation

@zack-rma

@zack-rma zack-rma commented Jan 1, 2025

Copy link
Copy Markdown
Collaborator

Problem Description

Fixes #240.

Solution

Implements integration testing against OpenTSDB.

how you tested the change

Integration testing included.

Where the following done:

  • Tests. Check all that apply:
    • Unit tests created or modified that run during ant test.
    • Integration tests created or modified that run during integration testing
      (Formerly called regression tests.)
    • Test procedure descriptions for manual testing
  • Was relevant documentation updated?
  • Were relevant config element (e.g. XML data) updated as appropriate

If you aren't sure leave unchecked and we will help guide you to want needs changing where.

@zack-rma zack-rma force-pushed the feature/task_cwms_support_platform_resources_it branch from e4419b0 to dd0a7e4 Compare January 9, 2025 18:19
@zack-rma

Copy link
Copy Markdown
Collaborator Author

Requires method implementations in Toolkit that can be found here: adamkorynta/opendcs#7

@zack-rma

Copy link
Copy Markdown
Collaborator Author

Retrieval bug under investigation. Unable to retrieve stored data, objects come back with a valid DBKey but no other data populated. NetlistResources is currently experiencing the same bug, it is unclear if they are related.

@zack-rma zack-rma changed the title Integration Testing for PlatformResources PlatformResources Controller Refactor with Integration Testing for OpenTSDB Jan 16, 2025
@zack-rma zack-rma self-assigned this Jan 16, 2025
@zack-rma zack-rma marked this pull request as ready for review January 28, 2025 23:47
@zack-rma zack-rma requested a review from adamkorynta January 28, 2025 23:47
@zack-rma

Copy link
Copy Markdown
Collaborator Author

Bugs cleared up, requires changes in Toolkit including changes to testing harness.

Comment thread opendcs-rest-api/src/test/java/org/opendcs/odcsapi/res/it/BaseIT.java Outdated
Comment thread opendcs-rest-api/src/main/java/org/opendcs/odcsapi/res/PlatformResources.java Outdated
Comment thread opendcs-rest-api/src/main/java/org/opendcs/odcsapi/res/PlatformResources.java Outdated
Comment thread opendcs-rest-api/src/main/java/org/opendcs/odcsapi/res/PlatformResources.java Outdated
Comment thread opendcs-rest-api/src/main/java/org/opendcs/odcsapi/res/PlatformResources.java Outdated
Comment thread opendcs-rest-api/src/main/java/org/opendcs/odcsapi/res/PlatformResources.java Outdated
Comment thread opendcs-rest-api/src/main/java/org/opendcs/odcsapi/res/PlatformResources.java Outdated
@zack-rma zack-rma force-pushed the feature/task_cwms_support_platform_resources_it branch 2 times, most recently from 976db78 to 0dba73e Compare January 30, 2025 22:35
@zack-rma zack-rma force-pushed the feature/task_cwms_support_platform_resources_it branch from 0dba73e to be17a24 Compare January 31, 2025 18:00
@zack-rma zack-rma force-pushed the feature/task_cwms_support_platform_resources_it branch from be17a24 to 7666abd Compare January 31, 2025 19:01
ret.setAgency(platform.getAgency());
ret.setDescription(platform.getDescription());
ret.setPlatformDesignator(platform.getDesignator());
ret.lastModifyTime = Objects.requireNonNull(platform.getLastModified());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This will throw a null pointer exception, which is an error code 500 internal error rather than specifying a client error. I don't see the pre-existing logic performing this validation. In the old dao, the last modified is getting set to current and then returned to the client.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I reverted it to use the current date. This field was causing a silent exception within the Toolkit when null. I'll likely make a PR with a fix for that next week.

@sonarqubecloud

sonarqubecloud Bot commented Feb 3, 2025

Copy link
Copy Markdown

@adamkorynta adamkorynta merged commit 7a8766e into opendcs:feature/task_cwms_support Feb 3, 2025
@zack-rma zack-rma removed their assignment Feb 4, 2025
adamkorynta pushed a commit that referenced this pull request Mar 13, 2025
…enTSDB (#312)

Refactored PlatformResources Controller, added OpenTSDB integration testing
adamkorynta pushed a commit that referenced this pull request Mar 24, 2025
…enTSDB (#312)

Refactored PlatformResources Controller, added OpenTSDB integration testing
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

OpenTSDB: Create Integration Tests for PlatformResources controller Refactor PlatformResources controller

2 participants