Giter Club home page Giter Club logo

Comments (13)

dje1990 avatar dje1990 commented on August 11, 2024

The same result occurs when using JUnit 4.12 instead of JUnit 5.3.1

from gradle-testsets-plugin.

tkrullmann avatar tkrullmann commented on August 11, 2024

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.

Zar86 avatar Zar86 commented on August 11, 2024

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.

dje1990 avatar dje1990 commented on August 11, 2024

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.

tkrullmann avatar tkrullmann commented on August 11, 2024

@Zar86, can you post a more detailed example / include the error message from the compiler?

from gradle-testsets-plugin.

Zar86 avatar Zar86 commented on August 11, 2024

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.

dje1990 avatar dje1990 commented on August 11, 2024

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.

Zar86 avatar Zar86 commented on August 11, 2024

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.

tkrullmann avatar tkrullmann commented on August 11, 2024

No, it should be done by the plugin automatically. I'll reopen the issue.

from gradle-testsets-plugin.

Zar86 avatar Zar86 commented on August 11, 2024

Thanks

from gradle-testsets-plugin.

tkrullmann avatar tkrullmann commented on August 11, 2024

Please try again with version 2.0.3

from gradle-testsets-plugin.

Zar86 avatar Zar86 commented on August 11, 2024

Thanks for the prompt decision of a problem!

from gradle-testsets-plugin.

tkrullmann avatar tkrullmann commented on August 11, 2024

This should be solved by #66 and the accompanying PR

from gradle-testsets-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.