-
Notifications
You must be signed in to change notification settings - Fork 366
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
928 ceilometer statistics date parsing #1049
Conversation
Also, what is the release cycle for OS4J? |
Ah. Sorry for the delay. Too busy. I'll take a look tomorrow morning. sets a reminder |
No problem, I was just wondering if anyone had seen it, or what the procedure was :) Thanks for checking it out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Despite the comments this looks good @pdube
private Date periodEnd; | ||
|
||
private Double sum; | ||
|
||
private String unit; | ||
|
||
private String groupby; | ||
@JsonProperty("groupby") | ||
private Map<String, Object> groupBy; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it justMap<String, String>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It actually didn't work with the second type as a String. It was just ignored by Jackson. This field is actually a bit confusing, it looks like:
{"project_id":"some_id"}
It itsn't necessary for this PR so I think I will revert the change.
@@ -13,19 +19,25 @@ | |||
* @author Jeremy Unruh | |||
*/ | |||
public class CeilometerStatistics implements Statistics { | |||
|
|||
private static final Logger LOG = LoggerFactory.getLogger(CeilometerStatistics.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation alternating between spaces and tabs. Could you reformat this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do
@@ -34,17 +46,22 @@ | |||
|
|||
private Integer period; | |||
|
|||
@JsonProperty("period_start") | |||
@JsonProperty("period_start") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS")
@JsonProperty("period_start")
private Date durationStart;
instead of adding a new property work?
Then you could also revert the changes made to the getDurationStart()
and getDurationEnd()
.
Please add a test for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, didn't know that existed. Will test
At least the pipeline runs the tests. |
@auhlig I checked out the pipeline, and the tests from core-test are not being run.
|
There is
In the pom.xml of core-test |
They are executed for each connector. Scroll further. Then you the the logs from the tests. |
Ok, so if I create a test for this, in which project should it be created? In core? |
The unit tests can be found under the respective service-folder in the |
I reverted the |
Sorry. Was about to review but hit close accidentally. |
Awesome. Thanks :) |
Thanks for contributing @pdube :) |
Hi,
This is my first PR for openstack4j. The dates being parsed for the Statistics are not offset anymore by the microseconds as explained in #928. I am having problems running the core-tests though, each time, I am getting
Tests are skipped.
even when adding-Dmaven.test.skip=false
If someone could give me a hand that would be great