kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | dd209a8c868b1409363851488b8662beb8c4bac727fe02f0c5b939427e7d0862 |
|---|---|
| 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:26 -05:00 |
| Parents | 3b9d21af8dc8 |
1 file changed
modified driver-mapping/src/test/java/com/datastax/driver/mapping/MapperUDTTest.java +5 −4
| @@ -498,20 +498,22 @@ | ||
| 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 { |
| 511 | 513 | manager.mapper(User.class); |
| 512 | 514 | fail("Expected IllegalArgumentException"); |
| 513 | 515 | } catch (IllegalArgumentException e) { |
| 514 | - assertThat(e.getMessage()).isEqualTo(String.format("Column \"mainaddress\" does not exist in table %s.users", keyspace)); | |
| 516 | + assertThat(e.getMessage()).isIn(String.format("Column \"mainaddress\" does not exist in table %s.users", keyspace)); | |
| 515 | 517 | } |
| 516 | 518 | } |
| 517 | 519 | |
| @@ -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. |