Skip to content

Commit

Permalink
[hibernate#1407] fix CockroachDB update schema test
Browse files Browse the repository at this point in the history
Signed-off-by: blafond <[email protected]>
  • Loading branch information
blafond committed Oct 18, 2022
1 parent 91f4c03 commit e8ee94d
Showing 1 changed file with 10 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,21 +155,17 @@ public void testUpdate(TestContext context) {
.setParameter( 1, "asimple" )
.getResultList()
.thenAccept( list -> {
context.assertEquals(
"CREATE INDEX i_asimple_avalue_astringvalue ON postgres.public.asimple USING btree (avalue ASC, astringvalue DESC)",
list.get( 0 )
context.assertTrue( list.contains(
"CREATE INDEX i_asimple_avalue_astringvalue ON postgres.public.asimple USING btree (avalue ASC, astringvalue DESC)")
);
context.assertEquals(
"CREATE INDEX i_asimple_avalue_data ON postgres.public.asimple USING btree (avalue DESC, data ASC)",
list.get( 1 )
context.assertTrue( list.contains(
"CREATE INDEX i_asimple_avalue_data ON postgres.public.asimple USING btree (avalue DESC, data ASC)")
);
context.assertEquals(
"CREATE UNIQUE INDEX \"primary\" ON postgres.public.asimple USING btree (id ASC)",
list.get( 2 )
context.assertTrue( list.contains(
"CREATE UNIQUE INDEX asimple_pkey ON postgres.public.asimple USING btree (id ASC)")
);
context.assertEquals(
"CREATE UNIQUE INDEX u_asimple_astringvalue ON postgres.public.asimple USING btree (astringvalue ASC)",
list.get( 3 )
context.assertTrue( list.contains(
"CREATE UNIQUE INDEX u_asimple_astringvalue ON postgres.public.asimple USING btree (astringvalue ASC)")
);
} )
)
Expand All @@ -178,7 +174,7 @@ public void testUpdate(TestContext context) {
.getSingleResult()
.thenAccept( result ->
context.assertEquals(
"CREATE UNIQUE INDEX \"primary\" ON postgres.public.aother USING btree (id1 ASC, id2 ASC)",
"CREATE UNIQUE INDEX aother_pkey ON postgres.public.aother USING btree (id1 ASC, id2 ASC)",
result
)
)
Expand All @@ -188,7 +184,7 @@ public void testUpdate(TestContext context) {
.getSingleResult()
.thenAccept( result ->
context.assertEquals(
"CREATE UNIQUE INDEX \"primary\" ON postgres.public.aanother USING btree (id ASC)",
"CREATE UNIQUE INDEX aanother_pkey ON postgres.public.aanother USING btree (id ASC)",
result
)
)
Expand Down

0 comments on commit e8ee94d

Please sign in to comment.