Skip to content

Commit

Permalink
avoid running the same same test twice when using -t option in runtes…
Browse files Browse the repository at this point in the history
…ts.sh

avoid running the same same test twice when using -t option in runtests.sh.
  • Loading branch information
ashitsalesforce committed Sep 24, 2024
1 parent 3669c9c commit 79f6a19
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
22 changes: 18 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<test.encryptionFile></test.encryptionFile>
<test.redirect>false</test.redirect>
<test.testfiles.directory>${project.build.testOutputDirectory}/testfiles</test.testfiles.directory>
<skip-unit-tests>false</skip-unit-tests>
</properties>

<repositories>
Expand Down Expand Up @@ -524,10 +525,17 @@
<id>unit-tests</id>
<phase>package</phase>
<configuration>
<skipTests>false</skipTests>
<skipTests>${skip-unit-tests}</skipTests>
<excludes>
<!-- skip integration tests -->
<exclude>**/client/**, **/dyna/SObjectReferenceConverterTest.*, **/integration/**, **/mapping/LoadMapperTest.*, **/mapping/SOQLMapperTest.*, **/process/** </exclude>
<exclude>
**/client/**,
**/dyna/SObjectReferenceConverterTest.*,
**/integration/**,
**/mapping/LoadMapperTest.*,
**/mapping/SOQLMapperTest.*,
**/process/**
</exclude>
</excludes>
</configuration>
<goals>
Expand All @@ -538,10 +546,16 @@
<id>integration-tests</id>
<phase>verify</phase>
<configuration>
<skipTests>false</skipTests>
<skipTests>!${skip-unit-tests}</skipTests>
<excludes>
<exclude>
<!-- Specify the list of integration tests to exclude -->
**/action/**,
**/dao/**,
**/dyna/BooleanConverterTest.*,
**/dyna/DateConverterTest.*,
**/EncryptionUtil/**,
**/mapping/SOQLMapperTest.*,
**/util/**
</exclude>
</excludes>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion rundl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ while getopts ":dbe:v:" flag
do
case "${flag}" in
d)
debug="-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=5005,suspend=y"
debug="-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=0.0.0.0:5005,suspend=y"
;;
b)
batchmodeargs="./.. upsertAccounts run.mode=batch"
Expand Down
4 changes: 2 additions & 2 deletions runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ do
;;
d)
debug="-Dmaven.surefire.debug"
debugEncryption="-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=5005,suspend=y"
debugEncryption="-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=0.0.0.0:5005,suspend=y"

;;
t)
test="-Dtest=com.salesforce.dataloader.${OPTARG}"
test="-Dskip-unit-tests=true -Dtest=com.salesforce.dataloader.${OPTARG}"
;;
f)
encryptionFile="${OPTARG}"
Expand Down

0 comments on commit 79f6a19

Please sign in to comment.