Skip to content

Commit

Permalink
Fixing build
Browse files Browse the repository at this point in the history
- updated unit test
- fixing harnesses
- fixing test data generators
- fixing integration tests

finos#6734
  • Loading branch information
davidwatkins73 committed Aug 29, 2023
1 parent 2f34a35 commit ac20a74
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,23 @@ public long createRating(EntityReference ref, long measurableId) {
ratingRecord.setLastUpdatedBy("test");
ratingRecord.setProvenance("test");

ratingRecord.store();

return dsl
.insertInto(MEASURABLE_RATING)
.set(ratingRecord)
.onDuplicateKeyIgnore()
.returning(MEASURABLE_RATING.ID)
.fetchOne()
.getId();
.select(MEASURABLE_RATING.ID)
.from(MEASURABLE_RATING)
.where(MEASURABLE_RATING.ENTITY_ID.eq(ref.id())
.and(MEASURABLE_RATING.ENTITY_KIND.eq(ref.kind().name()))
.and(MEASURABLE_RATING.MEASURABLE_ID.eq(measurableId)))
.fetchOne()
.get(MEASURABLE_RATING.ID);

}


public long createDecomm(long ratingId) {

System.out.println("Creating decom for rating id: " + ratingId);
MeasurableRatingPlannedDecommissionRecord decommissionRecord = dsl.newRecord(MEASURABLE_RATING_PLANNED_DECOMMISSION);
decommissionRecord.setMeasurableRatingId(ratingId);
decommissionRecord.setPlannedDecommissionDate(toSqlDate(nowUtcTimestamp()));
Expand Down

0 comments on commit ac20a74

Please sign in to comment.