Skip to content
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

Upgrade dependencies and maven plugins #1028

Merged
merged 2 commits into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 24 additions & 23 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,42 +23,43 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<!-- runtime dependencies -->
<jackson.version>2.15.2</jackson.version>
<java-uuid-generator.version>4.2.0</java-uuid-generator.version>
<jackson.version>2.17.2</jackson.version>
<java-uuid-generator.version>5.1.0</java-uuid-generator.version>
<logback-core.version>1.5.6</logback-core.version>
<logback-access.version>2.0.2</logback-access.version>

<!-- shaded runtime dependencies -->
<disruptor.version>3.4.4</disruptor.version>

<!-- test dependencies -->
<assertj.version>3.24.2</assertj.version>
<awaitility.version>4.2.0</awaitility.version>
<junit.version>5.9.2</junit.version>
<mockito.version>5.1.1</mockito.version>
<assertj.version>3.26.3</assertj.version>
<awaitility.version>4.2.1</awaitility.version>
<junit.version>5.10.3</junit.version>
<mockito.version>5.12.0</mockito.version>

<!-- maven plugins -->
<extra-enforcer-rules.version>1.6.1</extra-enforcer-rules.version>
<license-maven-plugin.version>4.1</license-maven-plugin.version>
<build-helper-maven-plugin.version>3.6.0</build-helper-maven-plugin.version>
<extra-enforcer-rules.version>1.8.0</extra-enforcer-rules.version>
<flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
<license-maven-plugin.version>4.5</license-maven-plugin.version>
<maven-bundle-plugin.version>5.1.9</maven-bundle-plugin.version>
<maven-checkstyle-plugin.version>3.3.0</maven-checkstyle-plugin.version>
<maven-clean-plugin.version>3.2.0</maven-clean-plugin.version>
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
<maven-enforcer-plugin.version>3.2.1</maven-enforcer-plugin.version>
<maven-flatten-plugin.version>1.5.0</maven-flatten-plugin.version>
<maven-checkstyle-plugin.version>3.4.0</maven-checkstyle-plugin.version>
<maven-clean-plugin.version>3.4.0</maven-clean-plugin.version>
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
<maven-enforcer-plugin.version>3.5.0</maven-enforcer-plugin.version>
<maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>
<maven-install-plugin.version>3.1.1</maven-install-plugin.version>
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
<maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version>
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
<maven-install-plugin.version>3.1.2</maven-install-plugin.version>
<maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
<maven-javadoc-plugin.version>3.8.0</maven-javadoc-plugin.version>
<maven-release-plugin.version>3.1.1</maven-release-plugin.version>
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
<maven-shade-plugin.version>3.4.1</maven-shade-plugin.version>
<maven-shade-plugin.version>3.6.0</maven-shade-plugin.version>
<maven-source-plugin.version>3.3.0</maven-source-plugin.version>
<maven-surefire-plugin.version>3.1.0</maven-surefire-plugin.version>
<maven-surefire-plugin.version>3.3.1</maven-surefire-plugin.version>
<nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
<xml-maven-plugin.version>1.0.2</xml-maven-plugin.version>
<xml-maven-plugin.version>1.1.0</xml-maven-plugin.version>

<checkstyle.version>10.7.0</checkstyle.version>
<checkstyle.version>10.17.0</checkstyle.version>

<!-- maven-javadoc-plugin configuration -->
<maven.javadoc.failOnError>true</maven.javadoc.failOnError>
Expand Down Expand Up @@ -331,7 +332,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>${maven-flatten-plugin.version}</version>
<version>${flatten-maven-plugin.version}</version>
<configuration>
<flattenMode>ossrh</flattenMode>
<keepCommentsInPom>true</keepCommentsInPom>
Expand Down Expand Up @@ -735,7 +736,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.3.0</version>
<version>${build-helper-maven-plugin.version}</version>
<executions>
<execution>
<id>add-sample-sources</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
*
* @deprecated use {@link net.logstash.logback.composite.loggingevent.SequenceJsonProvider} or {@link net.logstash.logback.composite.accessevent.SequenceJsonProvider} instead.
*/
@Deprecated
public class SequenceJsonProvider<Event extends DeferredProcessingAware> extends AbstractFieldJsonProvider<Event> {

public static final String FIELD_SEQUENCE = "sequence";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ protected Future<?> scheduleReaderCallable(Callable<Void> readerCallable) {
@BeforeEach
public void setup() throws Exception {
super.setup();

appender.setEncoder(encoder);

when(socketFactory.createSocket()).thenReturn(socket);
when(socket.getOutputStream()).thenReturn(outputStream);
Expand Down Expand Up @@ -554,7 +556,7 @@ public void eventSent(Appender<ILoggingEvent> appender, Socket socket, ILoggingE
long e1Tstamp = tstamps.get(e1);
long e2Tstamp = tstamps.get(e2);

assertThat(e1Tstamp).isGreaterThan(now + appender.getInitialSendDelay().getMilliseconds());
assertThat(e1Tstamp).isGreaterThanOrEqualTo(now + appender.getInitialSendDelay().getMilliseconds());
assertThat(e2Tstamp).isGreaterThanOrEqualTo(e1Tstamp);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import ch.qos.logback.access.common.spi.IAccessEvent;
import com.fasterxml.jackson.core.JsonGenerator;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InOrder;
Expand All @@ -42,7 +43,12 @@ public class AccessEventNestedJsonProviderTest {

@Mock
private AccessEventJsonProviders providers;


@BeforeEach
void beforeEach() {
provider.setProviders(providers);
}

@Test
public void testWrite() throws IOException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.JsonFactoryBuilder;
import com.fasterxml.jackson.core.JsonGenerator;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InOrder;
Expand All @@ -45,6 +46,11 @@ public class LoggingEventNestedJsonProviderTest {

@Mock
private LoggingEventJsonProviders providers;

@BeforeEach
void beforeEach() {
provider.setProviders(providers);
}

@Test
public void testWrite() throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatCode;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.spy;
Expand Down Expand Up @@ -249,7 +250,7 @@ public void testFactoryThrowsException() {
*/
@Test
public void testRecycleThrowsException() {
PooledObject obj1 = spy(pool.acquire());
PooledObject obj1 = pool.acquire();
when(obj1.recycle()).thenThrow(new RuntimeException());

assertThatCode(() -> pool.release()).doesNotThrowAnyException();
Expand All @@ -262,7 +263,8 @@ public void testRecycleThrowsException() {
*/
@Test
public void testDisposeThrowsException() {
PooledObject obj1 = spy(pool.acquire());
PooledObject obj1 = pool.acquire();
doReturn(false).when(obj1).recycle();
doThrow(new RuntimeException()).when(obj1).dispose();

assertThatCode(() -> pool.release()).doesNotThrowAnyException();
Expand Down
Loading