Repository: cassandra Updated Branches: refs/heads/trunk 484e1c47f -> 0ebc0e4c8
Cleanup UserTypesTest#testAlteringUserTypeNestedWithinNonFrozenMap Patch by Alex Petrov; reviewed by Joel Knighton for CASSANDRA-12010. Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0ebc0e4c Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0ebc0e4c Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0ebc0e4c Branch: refs/heads/trunk Commit: 0ebc0e4c8ccea4095ddf775a23dde3edc9d4108c Parents: 484e1c4 Author: Alex Petrov <[email protected]> Authored: Wed Jun 15 18:24:31 2016 +0200 Committer: Sylvain Lebresne <[email protected]> Committed: Thu Jun 23 10:26:31 2016 +0200 ---------------------------------------------------------------------- .../cql3/validation/entities/UserTypesTest.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/0ebc0e4c/test/unit/org/apache/cassandra/cql3/validation/entities/UserTypesTest.java ---------------------------------------------------------------------- diff --git a/test/unit/org/apache/cassandra/cql3/validation/entities/UserTypesTest.java b/test/unit/org/apache/cassandra/cql3/validation/entities/UserTypesTest.java index 7eae039..59383c6 100644 --- a/test/unit/org/apache/cassandra/cql3/validation/entities/UserTypesTest.java +++ b/test/unit/org/apache/cassandra/cql3/validation/entities/UserTypesTest.java @@ -285,15 +285,11 @@ public class UserTypesTest extends CQLTester execute("ALTER TYPE " + columnType + " ADD b int"); execute("UPDATE %s SET y['secondValue'] = {a: 2, b: 2} WHERE x = 1"); - assertRows(execute("SELECT * FROM %s"), - row(1, map("firstValue", userType("a", 1), - "secondValue", userType("a", 2, "b", 2)))); - - flush(); - - assertRows(execute("SELECT * FROM %s"), - row(1, map("firstValue", userType("a", 1), - "secondValue", userType("a", 2, "b", 2)))); + beforeAndAfterFlush(() -> + assertRows(execute("SELECT * FROM %s"), + row(1, map("firstValue", userType("a", 1), + "secondValue", userType("a", 2, "b", 2)))) + ); } @Test
