Skip to content

Commit

Permalink
remove test from TCK
Browse files Browse the repository at this point in the history
This test makes a hard assumption that incorrect query by
method name queries are accepted at compilation time and
throw an exception at runtime. In fact, the provider is
permitted to reject this sort of incorrect code at build
time.
  • Loading branch information
gavinking committed Apr 4, 2024
1 parent aeb85fe commit 441b6af
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
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
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 441b6af

Please sign in to comment.