kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | 84da8bad91bba9b5ec9de680deea56efa67ffbdfc79da69283250f5630247c43 |
|---|---|
| Author | Andrew Tolbert <andrew.tolbert@datastax.com> · 2016-10-04 13:29 -05:00 |
| Committer | Andrew Tolbert <andrew.tolbert@datastax.com> · 2016-10-04 14:31 -05:00 |
| Parents | 178485c47945 |
1 file changed
modified driver-mapping/src/test/java/com/datastax/driver/mapping/MapperUDTTest.java +4 −3
| @@ -498,13 +498,15 @@ | ||
| 498 | 498 | mapper.save(user); |
| 499 | 499 | fail("Expected InvalidQueryException"); |
| 500 | 500 | } catch (InvalidQueryException e) { |
| 501 | - assertThat(e.getMessage()).isEqualTo("Unknown identifier mainaddress"); | |
| 501 | + // Error message varies by C* version. | |
| 502 | + assertThat(e.getMessage()).isIn("Unknown identifier mainaddress", "Undefined column name mainaddress"); | |
| 502 | 503 | } |
| 503 | 504 | try { |
| 504 | 505 | mapper.get(user.getUserId()); |
| 505 | 506 | fail("Expected InvalidQueryException"); |
| 506 | 507 | } catch (InvalidQueryException e) { |
| 507 | - assertThat(e.getMessage()).isEqualTo("Undefined name mainaddress in selection clause"); | |
| 508 | + // Error message varies by C* version. | |
| 509 | + assertThat(e.getMessage()).isIn("Undefined name mainaddress in selection clause", "Undefined column name mainaddress"); | |
| 508 | 510 | } |
| 509 | 511 | // trying to use a new mapper |
| 510 | 512 | try { |
| @@ -622,7 +624,6 @@ | ||
| 622 | 624 | } |
| 623 | 625 | } |
| 624 | 626 | |
| 625 | - | |
| 626 | 627 | /** |
| 627 | 628 | * Ensures that when attempting to create a {@link TypeCodec} from a class that has a field that does not exist in |
| 628 | 629 | * the UDT that an {@link IllegalArgumentException} is thrown. |