Skip to content

Conversation

MoonBow-1
Copy link
Contributor

@MoonBow-1 MoonBow-1 commented Mar 17, 2025

Fixes #27

  • Removes PowerMock
  • Uses the TestServer implementation from jla_01

@MoonBow-1 MoonBow-1 requested a review from eemhu March 17, 2025 14:34
@MoonBow-1 MoonBow-1 self-assigned this Mar 17, 2025
@MoonBow-1 MoonBow-1 mentioned this pull request Mar 18, 2025
1 task
@kortemik
Copy link
Member

kortemik commented Apr 8, 2025

please rebase

@MoonBow-1
Copy link
Contributor Author

please rebase

Rebase done

pom.xml Outdated
<dependency>
<groupId>systems.manifold</groupId>
<artifactId>manifold-all</artifactId>
<groupId>systems.manifold</groupId>
Copy link
Member

Choose a reason for hiding this comment

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

is manifold needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apparently not, project compiles and verifies without the plugin.
Should a new issue be made for the removal?

Copy link
Member

Choose a reason for hiding this comment

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

yes please

@@ -1,17 +1,47 @@
/*
Copy link
Member

Choose a reason for hiding this comment

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

license must not change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

License reverted in c7b9490

@@ -1,20 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ HTTP Event Capture to RFC5424 CFE_16
Copy link
Member

Choose a reason for hiding this comment

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

please remove dashes at line start

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in commit 11148e0

@MoonBow-1
Copy link
Contributor Author

@kortemik Rebase done.
#24 created, since there are some files that require formatting to be done.

else {
final String eventString = event.toString();
DefaultHttpEventData defaultHttpEventData = new DefaultHttpEventData();
defaultHttpEventData.setEvent(eventString);
Copy link
Member

Choose a reason for hiding this comment

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

why setter instead of ctor arg?

String jsonObjectStr = parser.next().toString();
eventData = verifyJsonData(jsonObjectStr, previousEvent);
eventData = assignMetaData(eventData, authToken, channel);
assignMetaData(eventData, authToken, channel);
Copy link
Member

Choose a reason for hiding this comment

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

method is using setters to modify method call args, which is horrible. please remove the method and move at least the calling code here.


/**
* Converts the given time stamp into epoch milliseconds. If the time value
* in the object has 13 digits, it means that time has been already given in epoch milliseconds.
Copy link
Member

Choose a reason for hiding this comment

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

why guesswork is required?

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 asked the original writer about the origin of this, but there wasn't a conclusive answer.

Should we trust that the incoming timestamp is in correct format?

Copy link
Member

Choose a reason for hiding this comment

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

check first if numeric only, if numeric only, then it is epoch, otherwise it might be known timestamp, try conversion to the known format and if it fails generate one for the time of the receive?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we try to convert a possible String timestamp from predetermined formats to a long timestamp? This was mentioned by @elliVM in our discussion, and formats are used in PTH_10

Copy link
Member

@kortemik kortemik left a comment

Choose a reason for hiding this comment

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

please see above comments and reply. I will check tests after the /main/ is resolved

@MoonBow-1 MoonBow-1 removed the review label May 12, 2025
- Cleans up the EventTime.asTime() if-else tree
- Old Time classes have been deleted
- Tests are missing and broken at the moment
…alue

- Allows for tests to declare an expected value
- Tested by running the test file 1000 times
- Causes problems if the test is not run in 30 seconds
- Some vars were not renamed when refactoring objects, so fix the HttpEvent... references
@MoonBow-1 MoonBow-1 removed the review label Aug 25, 2025
@MoonBow-1 MoonBow-1 mentioned this pull request Aug 25, 2025
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.

Remove mocking from the project tests
4 participants