Comments (13)
The same result occurs when using JUnit 4.12 instead of JUnit 5.3.1
from gradle-testsets-plugin.
That was quick, I haven't even used the new version myself (obviously ;-) )
Blatant oversight... I modified the classpath of the Test task with =
instead of +=
, effectively replacing the classpath that was already there.
Thanks for the detailed example!
from gradle-testsets-plugin.
id 'org.unbroken-dome.test-sets' version '2.0.2' //does not work
Testing started at 15:43 ...
15:43:34: Executing task 'integrationTest'...
Parallel execution is an incubating feature.
Task :compileJava UP-TO-DATE
Task :processResources UP-TO-DATE
Task :eclipselinkWeaveClasses
Task :classes
Task :compileIntegrationTestJava FAILED
....
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':compileIntegrationTestJava'.
Compilation failed; see the compiler error output for details.
id 'org.unbroken-dome.test-sets' version '1.5.2' //work
from gradle-testsets-plugin.
Hi @Zar86,
The original issue in this thread was that the compiled classes were not available at integration test runtime.
This looks like the exception happened at the compile time for the integration tests.
Do you have more output describing the exception to better understand the issue?
Just looking at the above, your issue looks like a separate issue than the original issue in this thread.
Thanks
from gradle-testsets-plugin.
@Zar86, can you post a more detailed example / include the error message from the compiler?
from gradle-testsets-plugin.
Sorry for the delayed response.
id 'org.unbroken-dome.test-sets' version '2.0.2'
Testing started at 8:55 ...
8:55:28: Executing task 'integrationTest'...
Parallel execution is an incubating feature.
> Task :compileJava
Note: Creating static metadata factory ...
Note: Optional file was not found: META-INF/orm.xml continuing with generation.
Note: Optional file was not found: META-INF/eclipselink-orm.xml continuing with generation.
Note: Optional file was not found: META-INF/orm.xml continuing with generation.
Note: Optional file was not found: META-INF/eclipselink-orm.xml continuing with generation.
Note: /Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/main/java/ru/citc/fcb/mfc/internal/DomainEventsWebSocketPublisher.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
> Task :processResources
> Task :eclipselinkWeaveClasses
> Task :classes
> Task :compileIntegrationTestJava FAILED
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/SyncServiceTest.java:16: error: cannot find symbol
import ru.citc.fcb.mfc.internal.domain.ContactTreeNode;
^
symbol: class ContactTreeNode
location: package ru.citc.fcb.mfc.internal.domain
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/SyncServiceTest.java:17: error: cannot find symbol
import ru.citc.fcb.mfc.internal.domain.Debt;
^
symbol: class Debt
location: package ru.citc.fcb.mfc.internal.domain
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/SyncServiceTest.java:18: error: cannot find symbol
import ru.citc.fcb.mfc.internal.domain.Debtor;
^
symbol: class Debtor
location: package ru.citc.fcb.mfc.internal.domain
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/SyncServiceTest.java:19: error: cannot find symbol
import ru.citc.fcb.mfc.internal.domain.Device;
^
symbol: class Device
location: package ru.citc.fcb.mfc.internal.domain
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/SyncServiceTest.java:32: error: cannot find symbol
SyncService service;
^
symbol: class SyncService
location: class SyncServiceTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/domain/RepositoryTest.java:35: error: cannot find symbol
private Repository repository;
^
symbol: class Repository
location: class RepositoryTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/SyncServiceTest.java:47: error: cannot find symbol
final Device device = new Device("test", "deviceId", "p");
^
symbol: class Device
location: class SyncServiceTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/SyncServiceTest.java:47: error: cannot find symbol
final Device device = new Device("test", "deviceId", "p");
^
symbol: class Device
location: class SyncServiceTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/SyncServiceTest.java:56: error: cannot find symbol
final Debt debt = entityManager.find(Debt.class, 1L);
^
symbol: class Debt
location: class SyncServiceTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/SyncServiceTest.java:56: error: cannot find symbol
final Debt debt = entityManager.find(Debt.class, 1L);
^
symbol: class Debt
location: class SyncServiceTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/SyncServiceTest.java:59: error: cannot find symbol
final Debtor debtor = entityManager.find(Debtor.class, 1L);
^
symbol: class Debtor
location: class SyncServiceTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/SyncServiceTest.java:59: error: cannot find symbol
final Debtor debtor = entityManager.find(Debtor.class, 1L);
^
symbol: class Debtor
location: class SyncServiceTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/SyncServiceTest.java:62: error: cannot find symbol
final ContactTreeNode node = entityManager.find(ContactTreeNode.class, 4L);
^
symbol: class ContactTreeNode
location: class SyncServiceTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/SyncServiceTest.java:62: error: cannot find symbol
final ContactTreeNode node = entityManager.find(ContactTreeNode.class, 4L);
^
symbol: class ContactTreeNode
location: class SyncServiceTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/domain/RepositoryTest.java:52: error: cannot find symbol
final Debtor debtor = repository.createDebtor(1000L, "Test", false);
^
symbol: class Debtor
location: class RepositoryTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/domain/RepositoryTest.java:54: error: cannot find symbol
final Device device = new Device("l", "deviceId", "p");
^
symbol: class Device
location: class RepositoryTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/domain/RepositoryTest.java:54: error: cannot find symbol
final Device device = new Device("l", "deviceId", "p");
^
symbol: class Device
location: class RepositoryTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/domain/RepositoryTest.java:57: error: cannot find symbol
final CollectorStatistic statistic = repository.createCollectorStatistic(device.getLogin(), "sac", BigDecimal.ONE, BigDecimal.TEN, 1, 1);
^
symbol: class CollectorStatistic
location: class RepositoryTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/domain/RepositoryTest.java:59: error: cannot find symbol
final FilterType filterType = repository.createFilterType(1000, "f", true);
^
symbol: class FilterType
location: class RepositoryTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/domain/RepositoryTest.java:61: error: cannot find symbol
final Debt newDebt = repository.createDebt(1000L,
^
symbol: class Debt
location: class RepositoryTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/domain/RepositoryTest.java:63: error: cannot find symbol
DebtType.DCA,
^
symbol: variable DebtType
location: class RepositoryTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/domain/RepositoryTest.java:81: error: cannot find symbol
final AddressType addressType = repository.createAddressType(1000, "dsada", true);
^
symbol: class AddressType
location: class RepositoryTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/domain/RepositoryTest.java:83: error: cannot find symbol
final Address address = debtor.addAddress(1000L, addressType, "fcsadfasdasda", "dasdasdas", BigDecimal.valueOf(20.2), BigDecimal.valueOf(2222.3), true, false);
^
symbol: class Address
location: class RepositoryTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/domain/RepositoryTest.java:85: error: cannot find symbol
newDebt.addAddressJob(1000L, Instant.now(), LocalDate.now(), JobContactType.AR_VYEZDPOADRESU, JobStatus.CREATED, "fsdfsdfsdfsd", false, address);
^
symbol: variable JobContactType
location: class RepositoryTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/domain/RepositoryTest.java:85: error: cannot find symbol
newDebt.addAddressJob(1000L, Instant.now(), LocalDate.now(), JobContactType.AR_VYEZDPOADRESU, JobStatus.CREATED, "fsdfsdfsdfsd", false, address);
^
symbol: variable JobStatus
location: class RepositoryTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/domain/RepositoryTest.java:87: error: cannot find symbol
final ContactTreeNode node = repository.createContactTreeNode(1000L, TreeContactType.AR_VYEZDPOADRESU, "name1", 0, "123355", false);
^
symbol: class ContactTreeNode
location: class RepositoryTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/domain/RepositoryTest.java:87: error: cannot find symbol
final ContactTreeNode node = repository.createContactTreeNode(1000L, TreeContactType.AR_VYEZDPOADRESU, "name1", 0, "123355", false);
^
symbol: variable TreeContactType
location: class RepositoryTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/domain/RepositoryTest.java:89: error: cannot find symbol
final FormFieldContactTree fieldContactTree = node.addFormFieldContactTree(1000L, "name1", "key", FieldType.STRING, 0, false);
^
symbol: class FormFieldContactTree
location: class RepositoryTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/domain/RepositoryTest.java:89: error: cannot find symbol
final FormFieldContactTree fieldContactTree = node.addFormFieldContactTree(1000L, "name1", "key", FieldType.STRING, 0, false);
^
symbol: variable FieldType
location: class RepositoryTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/domain/RepositoryTest.java:94: error: cannot find symbol
final Debt debt1 = entityManager.find(Debt.class, 1000L);
^
symbol: class Debt
location: class RepositoryTest
/Users/azaretskiy/projects/citc/fcb/mfc/mfc-backend/src/integrationTest/java/ru/citc/fcb/mfc/internal/domain/RepositoryTest.java:94: error: cannot find symbol
final Debt debt1 = entityManager.find(Debt.class, 1000L);
^
symbol: class Debt
location: class RepositoryTest
31 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileIntegrationTestJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 8s
from gradle-testsets-plugin.
Hi @Zar86
Do you have something like the below in your build.gradle
where the compiled output of main is being made available to the integration test compile time?
sourceSets {
integrationTest {
java {
srcDir "src/integrationTest/java"
}
resources {
srcDir "src/integrationTest/resources"
}
compileClasspath += sourceSets.main.runtimeClasspath
}
}
from gradle-testsets-plugin.
After adding
sourceSets {
integrationTest {
compileClasspath += sourceSets.main.runtimeClasspath
}
}
to the build.gradle integration test was performed.
But in version 1.5.2, the test was run without adding this code. This is so conceived, and now in version 2.0.2 I need to always add this code?
from gradle-testsets-plugin.
No, it should be done by the plugin automatically. I'll reopen the issue.
from gradle-testsets-plugin.
Thanks
from gradle-testsets-plugin.
Please try again with version 2.0.3
from gradle-testsets-plugin.
Thanks for the prompt decision of a problem!
from gradle-testsets-plugin.
This should be solved by #66 and the accompanying PR
from gradle-testsets-plugin.
Related Issues (20)
- Gradle 7 support HOT 1
- Testset specific JaCoCo exec files unused HOT 1
- How can I use 'integrationTestImplementation` when naming the source set 'integration-test' HOT 1
- TestSetBase uses deprecated API which gets removed in Gradle 7.0 HOT 2
- Jacoco integration test report xml not generating HOT 1
- Resources in the wrong priority HOT 1
- How to pass jvm arguments when running integrationTest
- Jacoco integration test report html not generating
- Gradle build succeeds despite broken test set
- Question: Can you have separate and merged jacoco reports HOT 1
- Gradle is not resolving DependencyHandler methods for test sets HOT 2
- Unable to run single integration test HOT 1
- compileIntegrationTestJava can not find class in src/test/java HOT 1
- Can it run tests in Kotlin?
- Plugin application fails on Gradle 8.0 HOT 10
- Lombok does not work in a non-standard test set
- is possible to have `test` run in parallel but `integrationTest` to be sync?`
- Broken in gradle 8.2.1 HOT 1
- 4.1.0 broke IntelliJ IDEA support HOT 3
- 4.1.0 released with Java11 byte code
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-testsets-plugin.