152 lines
13 KiB
Plaintext
152 lines
13 KiB
Plaintext
[INFO] Scanning for projects...
|
|
[INFO]
|
|
[INFO] ----------------------< br.gov.sigefp:sigefp-rh >-----------------------
|
|
[INFO] Building SIGEFP RH 1.0.0-SNAPSHOT
|
|
[INFO] from pom.xml
|
|
[INFO] --------------------------------[ jar ]---------------------------------
|
|
[INFO]
|
|
[INFO] --- resources:3.3.1:resources (default-resources) @ sigefp-rh ---
|
|
[INFO] skip non existing resourceDirectory C:\Users\donid\Documents\sigfip\sigefp\sigefp-rh\src\main\resources
|
|
[INFO]
|
|
[INFO] --- compiler:3.13.0:compile (default-compile) @ sigefp-rh ---
|
|
[INFO] Nothing to compile - all classes are up to date.
|
|
[INFO]
|
|
[INFO] --- resources:3.3.1:testResources (default-testResources) @ sigefp-rh ---
|
|
[INFO] skip non existing resourceDirectory C:\Users\donid\Documents\sigfip\sigefp\sigefp-rh\src\test\resources
|
|
[INFO]
|
|
[INFO] --- compiler:3.13.0:testCompile (default-testCompile) @ sigefp-rh ---
|
|
[INFO] Nothing to compile - all classes are up to date.
|
|
[INFO]
|
|
[INFO] --- surefire:3.2.5:test (default-test) @ sigefp-rh ---
|
|
[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
|
|
[INFO]
|
|
[INFO] -------------------------------------------------------
|
|
[INFO] T E S T S
|
|
[INFO] -------------------------------------------------------
|
|
[INFO] Running br.gov.sigefp.rh.service.PayrollServiceTest
|
|
mvn : WARNING: A
|
|
Java agent has been
|
|
loaded dynamically (C
|
|
:\Users\donid\.m2\rep
|
|
ository\net\bytebuddy
|
|
\byte-buddy-agent\1.1
|
|
4.10\byte-buddy-agent
|
|
-1.14.10.jar)
|
|
No linha:1
|
|
caractere:90
|
|
+ ... $env:Path";
|
|
mvn test -pl
|
|
sigefp-rh -Dtest=Payr
|
|
ollServiceTest >
|
|
test_o ...
|
|
+ ~~~
|
|
~~~~~~~~~~~~~~~~~~~~~
|
|
~~~~~~~~~~~~~~~~~~~~~
|
|
~~~~~~~~~~~~
|
|
+ CategoryInfo
|
|
: NotSpe
|
|
cified: (WARNING
|
|
: A Java...nt-1.
|
|
14.10.jar):Strin
|
|
g) [], RemoteExc
|
|
eption
|
|
+ FullyQualified
|
|
ErrorId : Native
|
|
CommandError
|
|
|
|
WARNING: If a
|
|
serviceability tool
|
|
is in use, please
|
|
run with -XX:+EnableD
|
|
ynamicAgentLoading
|
|
to hide this warning
|
|
WARNING: If a
|
|
serviceability tool
|
|
is not in use,
|
|
please run with -Djdk
|
|
.instrument.traceUsag
|
|
e for more
|
|
information
|
|
WARNING: Dynamic
|
|
loading of agents
|
|
will be disallowed
|
|
by default in a
|
|
future release
|
|
Java HotSpot(TM)
|
|
64-Bit Server VM
|
|
warning: Sharing is
|
|
only supported for
|
|
boot loader classes
|
|
because bootstrap
|
|
classpath has been
|
|
appended
|
|
[ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.380 s <<< FAILURE! -- in br.gov.sigefp.rh.service.PayrollServiceTest
|
|
[ERROR] br.gov.sigefp.rh.service.PayrollServiceTest.generatePayrollItems_WithSuccess -- Time elapsed: 2.271 s <<< ERROR!
|
|
org.mockito.exceptions.misusing.PotentialStubbingProblem:
|
|
|
|
Strict stubbing argument mismatch. Please check:
|
|
- this invocation of 'findByCode' method:
|
|
earningTypeRepository.findByCode("SUBSIDIO");
|
|
-> at br.gov.sigefp.rh.service.PayrollService.generatePayrollItems(PayrollService.java:154)
|
|
- has following stubbing(s) with different arguments:
|
|
1. earningTypeRepository.findByCode(
|
|
"ABONO_FAMILIA"
|
|
);
|
|
-> at br.gov.sigefp.rh.service.PayrollServiceTest.generatePayrollItems_WithSuccess(PayrollServiceTest.java:124)
|
|
Typically, stubbing argument mismatch indicates user mistake when writing tests.
|
|
Mockito fails early so that you can debug potential problem easily.
|
|
However, there are legit scenarios when this exception generates false negative signal:
|
|
- stubbing the same method multiple times using 'given().will()' or 'when().then()' API
|
|
Please use 'will().given()' or 'doReturn().when()' API for stubbing.
|
|
- stubbed method is intentionally invoked with different arguments by code under test
|
|
Please use default or 'silent' JUnit Rule (equivalent of Strictness.LENIENT).
|
|
For more information see javadoc for PotentialStubbingProblem class.
|
|
at br.gov.sigefp.rh.service.PayrollService.generatePayrollItems(PayrollService.java:154)
|
|
at br.gov.sigefp.rh.service.PayrollServiceTest.generatePayrollItems_WithSuccess(PayrollServiceTest.java:175)
|
|
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
|
|
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
|
|
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
|
|
|
|
[INFO]
|
|
[INFO] Results:
|
|
[INFO]
|
|
[ERROR] Errors:
|
|
[ERROR] PayrollServiceTest.generatePayrollItems_WithSuccess:175 ╗ PotentialStubbingProblem
|
|
Strict stubbing argument mismatch. Please check:
|
|
- this invocation of 'findByCode' method:
|
|
earningTypeRepository.findByCode("SUBSIDIO");
|
|
-> at br.gov.sigefp.rh.service.PayrollService.generatePayrollItems(PayrollService.java:154)
|
|
- has following stubbing(s) with different arguments:
|
|
1. earningTypeRepository.findByCode(
|
|
"ABONO_FAMILIA"
|
|
);
|
|
-> at br.gov.sigefp.rh.service.PayrollServiceTest.generatePayrollItems_WithSuccess(PayrollServiceTest.java:124)
|
|
Typically, stubbing argument mismatch indicates user mistake when writing tests.
|
|
Mockito fails early so that you can debug potential problem easily.
|
|
However, there are legit scenarios when this exception generates false negative signal:
|
|
- stubbing the same method multiple times using 'given().will()' or 'when().then()' API
|
|
Please use 'will().given()' or 'doReturn().when()' API for stubbing.
|
|
- stubbed method is intentionally invoked with different arguments by code under test
|
|
Please use default or 'silent' JUnit Rule (equivalent of Strictness.LENIENT).
|
|
For more information see javadoc for PotentialStubbingProblem class.
|
|
[INFO]
|
|
[ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0
|
|
[INFO]
|
|
[INFO] ------------------------------------------------------------------------
|
|
[INFO] BUILD FAILURE
|
|
[INFO] ------------------------------------------------------------------------
|
|
[INFO] Total time: 5.778 s
|
|
[INFO] Finished at: 2025-12-28T15:50:03Z
|
|
[INFO] ------------------------------------------------------------------------
|
|
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.2.5:test (default-test) on project sigefp-rh:
|
|
[ERROR]
|
|
[ERROR] Please refer to C:\Users\donid\Documents\sigfip\sigefp\sigefp-rh\target\surefire-reports for the individual test results.
|
|
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
|
|
[ERROR] -> [Help 1]
|
|
[ERROR]
|
|
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
|
|
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
|
|
[ERROR]
|
|
[ERROR] For more information about the errors and possible solutions, please read the following articles:
|
|
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
|