Michael Pasternak has posted comments on this change.
Change subject: findbugs: equals between different types
......................................................................
Patch Set 1: I would prefer that you didn't submit this
(5 inline comments)
also i'd suggest you running the tests after this change as
this flow was never tested
....................................................
File
backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/DiskStatisticalQueryTest.java
Line 46: return disk;
Line 47: }
Line 48:
Line 49: private void verifyStatistic(Statistic statistic) {
Line 50: if (statistic.equals(DiskStatisticalQuery.DATA_READ)) {
you cannot compare between two Statistic classes as they not implementing
equals() instead of omitting .getName() in statistic object, you should be
adding it to DiskStatisticalQuery.X
Line 51:
assertEquals(statistic.getValues().getValues().get(0).getDatum().intValue(),
READ_RATE);
Line 52: }
Line 53: if (statistic.equals(DiskStatisticalQuery.DATA_WRITE)) {
Line 54:
assertEquals(statistic.getValues().getValues().get(0).getDatum().intValue(),
WRITE_RATE);
Line 50: if (statistic.equals(DiskStatisticalQuery.DATA_READ)) {
Line 51:
assertEquals(statistic.getValues().getValues().get(0).getDatum().intValue(),
READ_RATE);
Line 52: }
Line 53: if (statistic.equals(DiskStatisticalQuery.DATA_WRITE)) {
Line 54:
assertEquals(statistic.getValues().getValues().get(0).getDatum().intValue(),
WRITE_RATE);
same
Line 55: }
Line 56: if (statistic.equals(DiskStatisticalQuery.READ_LATENCY)) {
Line 57:
assertEquals(statistic.getValues().getValues().get(0).getDatum().doubleValue(),
READ_LATENCY, EPSILON);
Line 58: }
Line 53: if (statistic.equals(DiskStatisticalQuery.DATA_WRITE)) {
Line 54:
assertEquals(statistic.getValues().getValues().get(0).getDatum().intValue(),
WRITE_RATE);
Line 55: }
Line 56: if (statistic.equals(DiskStatisticalQuery.READ_LATENCY)) {
Line 57:
assertEquals(statistic.getValues().getValues().get(0).getDatum().doubleValue(),
READ_LATENCY, EPSILON);
same
Line 58: }
Line 59: if (statistic.equals(DiskStatisticalQuery.WRITE_LATENCY)) {
Line 60:
assertEquals(statistic.getValues().getValues().get(0).getDatum().doubleValue(),
WRITE_LATENCY, EPSILON);
Line 61: }
Line 56: if (statistic.equals(DiskStatisticalQuery.READ_LATENCY)) {
Line 57:
assertEquals(statistic.getValues().getValues().get(0).getDatum().doubleValue(),
READ_LATENCY, EPSILON);
Line 58: }
Line 59: if (statistic.equals(DiskStatisticalQuery.WRITE_LATENCY)) {
Line 60:
assertEquals(statistic.getValues().getValues().get(0).getDatum().doubleValue(),
WRITE_LATENCY, EPSILON);
same
Line 61: }
Line 62: if (statistic.equals(DiskStatisticalQuery.FLUSH_LATENCY)) {
Line 63:
assertEquals(statistic.getValues().getValues().get(0).getDatum().doubleValue(),
FLUSH_LATENCY, EPSILON);
Line 64: }
Line 59: if (statistic.equals(DiskStatisticalQuery.WRITE_LATENCY)) {
Line 60:
assertEquals(statistic.getValues().getValues().get(0).getDatum().doubleValue(),
WRITE_LATENCY, EPSILON);
Line 61: }
Line 62: if (statistic.equals(DiskStatisticalQuery.FLUSH_LATENCY)) {
Line 63:
assertEquals(statistic.getValues().getValues().get(0).getDatum().doubleValue(),
FLUSH_LATENCY, EPSILON);
same
Line 64: }
Line 65: }
--
To view, visit http://gerrit.ovirt.org/14296
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I125e5df8def7a223f9469decc7aa43dab61f4a47
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Assaf Muller <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches