Skip to content

Commit 5521971

Browse files
Unit Tests clean up
1 parent 216947c commit 5521971

2 files changed

Lines changed: 27 additions & 106 deletions

File tree

ojdbc-provider-ucp-observability/src/test/java/oracle/ucp/provider/observability/JFRUCPEventListenerProviderTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void testIsDesiredEventReturnsTrueForAll() {
105105
UCPEventListener listener = provider.getListener(Collections.emptyMap());
106106
for (EventType type : EventType.values()) {
107107
assertTrue(listener.isDesiredEvent(type),
108-
"Expected isDesiredEvent to return true for: " + type);
108+
"Expected isDesiredEvent to return true for: " + type);
109109
}
110110
}
111111
}
@@ -119,14 +119,14 @@ class EventFactoryNullSafetyTests {
119119
@DisplayName("recordEvent() throws NullPointerException when EventType is null")
120120
void testRecordEventNullType() {
121121
assertThrows(NullPointerException.class, () ->
122-
UCPEventFactory.recordEvent(null, mockContext));
122+
UCPEventFactory.recordEvent(null, mockContext));
123123
}
124124

125125
@Test
126126
@DisplayName("recordEvent() throws NullPointerException when context is null")
127127
void testRecordEventNullContext() {
128128
assertThrows(NullPointerException.class, () ->
129-
UCPEventFactory.recordEvent(EventType.CONNECTION_BORROWED, null));
129+
UCPEventFactory.recordEvent(EventType.CONNECTION_BORROWED, null));
130130
}
131131
}
132132

@@ -157,7 +157,7 @@ void testRecordEventWithZeroValues() {
157157
when(zeroContext.getAverageConnectionWaitTime()).thenReturn(0L);
158158

159159
assertDoesNotThrow(() ->
160-
UCPEventFactory.recordEvent(EventType.CONNECTION_BORROWED, zeroContext));
160+
UCPEventFactory.recordEvent(EventType.CONNECTION_BORROWED, zeroContext));
161161
}
162162

163163
@Test
@@ -176,7 +176,7 @@ void testRecordEventWithNullPoolName() {
176176
when(nullPoolNameContext.getAverageConnectionWaitTime()).thenReturn(0L);
177177

178178
assertDoesNotThrow(() ->
179-
UCPEventFactory.recordEvent(EventType.CONNECTION_BORROWED, nullPoolNameContext));
179+
UCPEventFactory.recordEvent(EventType.CONNECTION_BORROWED, nullPoolNameContext));
180180
}
181181
}
182182

@@ -195,7 +195,7 @@ void testOnUCPEventDoesNotThrowForAllTypes(EventType type) {
195195

196196
@ParameterizedTest(name = "onUCPEvent() reads all context fields for EventType.{0}")
197197
@EnumSource(value = EventType.class, names = {
198-
"POOL_CREATED", "CONNECTION_BORROWED", "POOL_REFRESHED"
198+
"POOL_CREATED", "CONNECTION_BORROWED", "POOL_REFRESHED"
199199
})
200200
@DisplayName("onUCPEvent() reads all context fields for each event category")
201201
void testOnUCPEventReadsAllContextFields(EventType type) {

0 commit comments

Comments
 (0)