fixed unit tests

remotes/1728937285237262521/master
Amalka Subasinghe 1 year ago
parent b08f3fcc49
commit 9759520157

@ -155,7 +155,12 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.powermock</groupId> <groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId> <artifactId>powermock-api-mockito2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -253,12 +258,19 @@
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<configuration> <configuration>
<argLine>
--add-opens=java.xml/jdk.xml.internal=ALL-UNNAMED
--add-opens=java.base/jdk.internal.loader=ALL-UNNAMED
</argLine>
<systemPropertyVariables> <systemPropertyVariables>
<log4j.configuration>file:src/test/resources/log4j.properties</log4j.configuration> <log4j.configuration>file:src/test/resources/log4j.properties</log4j.configuration>
</systemPropertyVariables> </systemPropertyVariables>
<suiteXmlFiles> <suiteXmlFiles>
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile> <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
</suiteXmlFiles> </suiteXmlFiles>
<classpathDependencyExcludes>
<classpathDependencyExclude>org.ops4j.pax.logging</classpathDependencyExclude>
</classpathDependencyExcludes>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>

@ -43,9 +43,10 @@ import java.security.NoSuchAlgorithmException;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Properties; import java.util.Properties;
import org.powermock.modules.testng.PowerMockTestCase;
@PrepareForTest(JWTClientUtil.class) @PrepareForTest(JWTClientUtil.class)
public class JWTClientTest { public class JWTClientTest extends PowerMockTestCase{
private static final Log log = LogFactory.getLog(JWTClientTest.class); private static final Log log = LogFactory.getLog(JWTClientTest.class);
@ObjectFactory @ObjectFactory

@ -27,7 +27,7 @@
<EveryOneRoleName>everyone</EveryOneRoleName> <EveryOneRoleName>everyone</EveryOneRoleName>
<ReadOnly>false</ReadOnly> <ReadOnly>false</ReadOnly>
<MaxUserNameListLength>500</MaxUserNameListLength> <MaxUserNameListLength>500</MaxUserNameListLength>
<Property name="url">jdbc:h2:target/databasetest/CARBON_TEST</Property> <Property name="url">jdbc:h2:./target/databasetest/CARBON_TEST</Property>
<Property name="driverName">org.h2.Driver</Property> <Property name="driverName">org.h2.Driver</Property>
<Property name="maxActive">50</Property> <Property name="maxActive">50</Property>
<Property name="maxWait">60000</Property> <Property name="maxWait">60000</Property>

Loading…
Cancel
Save