Skip to content

Commit

Permalink
fixed logging testing
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
  • Loading branch information
thjaeckle committed Jan 16, 2024
1 parent 859f199 commit 7c3981b
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 11 deletions.
10 changes: 10 additions & 0 deletions internal/utils/pekko/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,16 @@
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<slf4j.provider>org.eclipse.ditto.internal.utils.pekko.logging.StaticMDCServiceProvider</slf4j.provider>
</systemPropertyVariables>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@

import javax.annotation.concurrent.ThreadSafe;

import org.slf4j.impl.ObservableMdcAdapter;

/**
* This {@link org.slf4j.impl.ObservableMdcAdapter.MdcAdapterObserver} captures put entries and removed keys for later
* This {@link ObservableMdcAdapter.MdcAdapterObserver} captures put entries and removed keys for later
* test assertions.
* <p>
* since 1.3.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnitRunner;
import org.slf4j.Logger;
import org.slf4j.impl.ObservableMdcAdapter;
import org.slf4j.impl.StaticMDCServiceProvider;

/**
* Unit test for {@link DefaultAutoCloseableSlf4jLogger}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnitRunner;
import org.slf4j.Logger;
import org.slf4j.impl.ObservableMdcAdapter;
import org.slf4j.impl.StaticMDCServiceProvider;

/**
* Unit test for {@link DefaultDittoLogger}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnitRunner;
import org.slf4j.Logger;
import org.slf4j.impl.ObservableMdcAdapter;
import org.slf4j.impl.StaticMDCServiceProvider;

/**
* Unit test for {@link ImmutableDittoLogger}.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/*
* Copyright (c) 2024 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/

/*
* Copyright (c) 2020 Contributors to the Eclipse Foundation
*
Expand All @@ -10,7 +23,7 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.slf4j.impl;
package org.eclipse.ditto.internal.utils.pekko.logging;

import java.util.Deque;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,20 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.slf4j.impl;

/*
* Copyright (c) 2024 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.eclipse.ditto.internal.utils.pekko.logging;

import javax.annotation.concurrent.Immutable;

Expand Down

0 comments on commit 7c3981b

Please sign in to comment.