Skip to content

Commit

Permalink
Merge pull request jakartaee#641 from gavinking/remove-test
Browse files Browse the repository at this point in the history
remove test for runtime error from TCK since method may be rejected at compilation time
  • Loading branch information
otaviojava authored Apr 4, 2024
2 parents 0587116 + 441b6af commit 8c3c198
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ public interface Catalog extends DataRepository<Product, String> {

int countByPriceGreaterThanEqual(Double price);

int countBySurgePriceGreaterThanEqual(Double price);

@Query("WHERE LENGTH(name) = ?1 AND price < ?2 ORDER BY name")
List<Product> findByNameLengthAndPriceBelow(int nameLength, double maxPrice);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.jupiter.api.Assertions;

import ee.jakarta.tck.data.framework.junit.anno.Assertion;
import ee.jakarta.tck.data.framework.junit.anno.Persistence;
Expand All @@ -41,7 +40,6 @@
import jakarta.data.Order;
import jakarta.data.Sort;
import jakarta.data.exceptions.EntityExistsException;
import jakarta.data.exceptions.MappingException;
import jakarta.data.exceptions.OptimisticLockingFailureException;
import jakarta.inject.Inject;

Expand Down Expand Up @@ -151,10 +149,6 @@ public void testNotRunOnNOSQL() {
int countExpensive = catalog.countByPriceGreaterThanEqual(2.99);
assertEquals(2, countExpensive, "Expected two products to be more than 3.00");

Assertions.assertThrows(MappingException.class, () -> {
catalog.countBySurgePriceGreaterThanEqual(2.99);
});

assertEquals(5L, catalog.deleteByProductNumLike("TEST-PROD-%"));
}

Expand Down

0 comments on commit 8c3c198

Please sign in to comment.