Skip to content

Commit

Permalink
Merge pull request #3913 from Agnul97/fix-junitTestsExclusion
Browse files Browse the repository at this point in the history
FIX - recently introduced junit tests poorly written
  • Loading branch information
Coduz authored Dec 5, 2023
2 parents 46921a5 + 9277ea5 commit 06742b4
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 4 deletions.
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
<jolokia-jvm.version>1.3.4</jolokia-jvm.version>
<jose4j.version>0.7.10</jose4j.version>
<junit.version>4.13.2</junit.version>
<jupiter.version>5.9.2</jupiter.version>
<liquibase.version>3.6.3</liquibase.version>
<log4j-api.version>2.17.1</log4j-api.version>
<log4j2-mock.version>0.0.2</log4j2-mock.version>
Expand Down Expand Up @@ -1809,6 +1810,11 @@
<artifactId>junit</artifactId>
<version>${junit.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${jupiter.version}</version>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*******************************************************************************/
package org.eclipse.kapua.service.authentication.shiro.realm;

import org.eclipse.kapua.qa.markers.junit.JUnitTests;
import org.eclipse.kapua.service.authentication.AccessTokenCredentials;
import org.eclipse.kapua.service.authentication.exception.KapuaAuthenticationException;
import org.eclipse.kapua.service.authentication.shiro.AccessTokenCredentialsImpl;
Expand All @@ -21,7 +22,9 @@
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;

@Category(JUnitTests.class)
public class AccessTokenCredentialsHandlerTest {

AccessTokenCredentialsHandler instance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*******************************************************************************/
package org.eclipse.kapua.service.authentication.shiro.realm;

import org.eclipse.kapua.qa.markers.junit.JUnitTests;
import org.eclipse.kapua.service.authentication.ApiKeyCredentials;
import org.eclipse.kapua.service.authentication.exception.KapuaAuthenticationException;
import org.eclipse.kapua.service.authentication.shiro.ApiKeyCredentialsImpl;
Expand All @@ -21,7 +22,9 @@
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;

@Category(JUnitTests.class)
public class ApiKeyCredentialsHandlerTest {

ApiKeyCredentialsHandler instance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*******************************************************************************/
package org.eclipse.kapua.service.authentication.shiro.realm;

import org.eclipse.kapua.qa.markers.junit.JUnitTests;
import org.eclipse.kapua.service.authentication.JwtCredentials;
import org.eclipse.kapua.service.authentication.exception.KapuaAuthenticationException;
import org.eclipse.kapua.service.authentication.shiro.JwtCredentialsImpl;
Expand All @@ -21,7 +22,9 @@
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;

@Category(JUnitTests.class)
public class JwtCredentialsHandlerTest {

JwtCredentialsHandler instance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*******************************************************************************/
package org.eclipse.kapua.service.authentication.shiro.realm;

import org.eclipse.kapua.qa.markers.junit.JUnitTests;
import org.eclipse.kapua.service.authentication.UsernamePasswordCredentials;
import org.eclipse.kapua.service.authentication.exception.KapuaAuthenticationException;
import org.eclipse.kapua.service.authentication.shiro.UsernamePasswordCredentialsImpl;
Expand All @@ -21,7 +22,9 @@
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;

@Category(JUnitTests.class)
public class UserPassCredentialsHandlerTest {

UserPassCredentialsHandler instance;
Expand Down
1 change: 0 additions & 1 deletion service/tag/internal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.9.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import org.eclipse.kapua.model.domain.Actions;
import org.eclipse.kapua.model.id.KapuaId;
import org.eclipse.kapua.model.id.KapuaIdImpl;
import org.eclipse.kapua.qa.markers.junit.JUnitTests;
import org.eclipse.kapua.service.authorization.AuthorizationService;
import org.eclipse.kapua.service.authorization.permission.Permission;
import org.eclipse.kapua.service.authorization.permission.PermissionFactory;
Expand All @@ -27,7 +26,6 @@
import org.eclipse.kapua.service.tag.TagRepository;
import org.eclipse.kapua.storage.TxContext;
import org.eclipse.kapua.storage.TxManager;
import org.junit.experimental.categories.Category;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand All @@ -37,7 +35,7 @@
import java.math.BigInteger;
import java.util.function.BiConsumer;

@Category(JUnitTests.class)
@org.junit.jupiter.api.Tag("org.eclipse.kapua.qa.markers.junit.JUnitTests")
public class TagServiceImplTest {

private static final MockSettings FAIL_ON_UNPREDICTED_METHOD_CALL = Mockito.withSettings()
Expand Down

0 comments on commit 06742b4

Please sign in to comment.