Skip to content

Commit

Permalink
[Subscriptions Release] - pre tag commit: 'rhsm-subscriptions-1.0.77'.
Browse files Browse the repository at this point in the history
  • Loading branch information
mstead committed Nov 25, 2021
2 parents 509f7b3 + abdd0e0 commit 0f952c9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = 1.0.76
version = 1.0.77
2 changes: 1 addition & 1 deletion src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ rhsm-subscriptions:
seek-override-end: ${KAFKA_SEEK_OVERRIDE_END:false}
seek-override-timestamp: ${KAFKA_SEEK_OVERRIDE_TIMESTAMP:}
prometheus-latency-duration: ${PROMETHEUS_LATENCY_DURATION:4h}
hourly-tally-offset: ${HOURLY_TALLY_OFFSET:60m}
hourly-tally-offset: ${HOURLY_TALLY_OFFSET:120m}
metric-lookup-range-duration: ${METRIC_LOOKUP_RANGE:1h}
subscription-sync-enabled: ${SUBSCRIPTION_SYNC_ENABLED:false}
subscription:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void testUpdateForSingleAccount() {
String account = "12345";
manager.updateAccountSnapshots(account);

verify(queue).enqueue(eq(createDescriptor(account)));
verify(queue).enqueue(createDescriptor(account));
}

@Test
Expand All @@ -82,7 +82,7 @@ void ensureUpdateIsRunForEachAccount() throws Exception {

manager.updateSnapshotsForAllAccounts();

verify(queue, times(1)).enqueue(eq(createDescriptor(expectedAccounts)));
verify(queue, times(1)).enqueue(createDescriptor(expectedAccounts));
}

@Test
Expand All @@ -93,8 +93,8 @@ void ensureAccountListIsPartitionedWhenSendingTaskMessages() throws Exception {
manager.updateSnapshotsForAllAccounts();

// NOTE: Partition size is defined in test.properties
verify(queue, times(1)).enqueue(eq(createDescriptor(Arrays.asList("a1", "a2"))));
verify(queue, times(1)).enqueue(eq(createDescriptor(Arrays.asList("a3", "a4"))));
verify(queue, times(1)).enqueue(createDescriptor(Arrays.asList("a1", "a2")));
verify(queue, times(1)).enqueue(createDescriptor(Arrays.asList("a3", "a4")));
}

@Test
Expand All @@ -105,9 +105,9 @@ void ensureLastAccountListPartitionIsIncludedWhenSendingTaskMessages() throws Ex
manager.updateSnapshotsForAllAccounts();

// NOTE: Partition size is defined in test.properties
verify(queue, times(1)).enqueue(eq(createDescriptor(Arrays.asList("a1", "a2"))));
verify(queue, times(1)).enqueue(eq(createDescriptor(Arrays.asList("a3", "a4"))));
verify(queue, times(1)).enqueue(eq(createDescriptor(Arrays.asList("a5"))));
verify(queue, times(1)).enqueue(createDescriptor(Arrays.asList("a1", "a2")));
verify(queue, times(1)).enqueue(createDescriptor(Arrays.asList("a3", "a4")));
verify(queue, times(1)).enqueue(createDescriptor(Arrays.asList("a5")));
}

@Test
Expand All @@ -117,14 +117,14 @@ void ensureErrorOnUpdateContinuesWithoutFailure() throws Exception {

doThrow(new RuntimeException("Forced!"))
.when(queue)
.enqueue(eq(createDescriptor(Arrays.asList("a3", "a4"))));
.enqueue(createDescriptor(Arrays.asList("a3", "a4")));

manager.updateSnapshotsForAllAccounts();

verify(queue, times(1)).enqueue(eq(createDescriptor(Arrays.asList("a1", "a2"))));
verify(queue, times(1)).enqueue(eq(createDescriptor(Arrays.asList("a3", "a4"))));
verify(queue, times(1)).enqueue(createDescriptor(Arrays.asList("a1", "a2")));
verify(queue, times(1)).enqueue(createDescriptor(Arrays.asList("a3", "a4")));
// Even though a3,a4 throws exception, a5,a6 should be enqueued.
verify(queue, times(1)).enqueue(eq(createDescriptor(Arrays.asList("a5", "a6"))));
verify(queue, times(1)).enqueue(createDescriptor(Arrays.asList("a5", "a6")));
}

@Test
Expand Down Expand Up @@ -176,8 +176,8 @@ void testHourlySnapshotTallyOffset() throws Exception {
// 2019-05-24T12:35Z truncated to top of the hour - 4 hours prometheus latency
// - 1 hour
// tally latency - 1 hour metric range
.setSingleValuedArg("startDateTime", "2019-05-24T06:00:00Z")
.setSingleValuedArg("endDateTime", "2019-05-24T07:00:00Z")
.setSingleValuedArg("startDateTime", "2019-05-24T05:00:00Z")
.setSingleValuedArg("endDateTime", "2019-05-24T06:00:00Z")
.build());
});
}
Expand Down
6 changes: 3 additions & 3 deletions templates/rhsm-subscriptions-scheduler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ parameters:
- name: SPLUNK_FORWARDER_CPU_LIMIT
value: 100m
- name: HOURLY_TALLY_OFFSET
value: 60m
value: 120m
- name: TOKEN_REFRESHER_IMAGE
value: quay.io/observatorium/token-refresher:master-2021-02-05-5da9663
- name: TOKEN_REFRESHER_CPU_REQUEST
Expand Down Expand Up @@ -110,8 +110,6 @@ objects:
value: ${KAFKA_BOOTSTRAP_HOST}
- name: OPENSHIFT_METERING_RANGE
value: ${OPENSHIFT_METERING_RANGE}
- name: HOURLY_TALLY_OFFSET
value: ${HOURLY_TALLY_OFFSET}
- name: DATABASE_HOST
valueFrom:
secretKeyRef:
Expand Down Expand Up @@ -392,6 +390,8 @@ objects:
value: ${LOGGING_LEVEL}
- name: KAFKA_BOOTSTRAP_HOST
value: ${KAFKA_BOOTSTRAP_HOST}
- name: HOURLY_TALLY_OFFSET
value: ${HOURLY_TALLY_OFFSET}
- name: DATABASE_HOST
valueFrom:
secretKeyRef:
Expand Down

0 comments on commit 0f952c9

Please sign in to comment.