Skip to content

Commit e2b6152

Browse files
committed
Fix UT due to bug fixed on server side.
Details on Bug#33149565
1 parent b2fed14 commit e2b6152

File tree

1 file changed

+13
-23
lines changed

1 file changed

+13
-23
lines changed

devapi/tests/crud-t.cc

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3110,31 +3110,21 @@ TEST_F(Crud, PS_find)
31103110
docs = cFind.execute();
31113111
check_ps("my_name_only", 0);
31123112

3113-
//This try/catch block is only needed untill BUG#33149565 is fixed.
3114-
//Remove it when this fails
3115-
try {
3116-
cFind.fields("max(age) as my_age", "name as my_name_only").groupBy("misc", "name").having("max(my_age) = 5");
3117-
docs = cFind.execute();
3118-
check_ps("my_age", 0);
3119-
check_ps("my_name_only", 0);
3120-
3121-
3122-
3123-
cFind.having("max(my_age) = 6");
3124-
docs = cFind.execute();
3125-
check_ps("my_age", 0);
3126-
check_ps("my_age", 0);
3127-
check_ps("= 6", 0);
3113+
cFind.fields("max(age) as my_age", "name as my_name_only").groupBy("misc", "name").having("my_age = 5");
3114+
docs = cFind.execute();
3115+
check_ps("my_age", 0);
3116+
check_ps("my_name_only", 0);
31283117

3129-
docs = cFind.execute();
3130-
check_ps("my_age", 1);
3131-
check_ps("my_age", 1);
3132-
check_ps("= 6", 1);
3118+
cFind.having("my_age = 6");
3119+
docs = cFind.execute();
3120+
check_ps("my_age", 0);
3121+
check_ps("my_age", 0);
3122+
check_ps("= 6", 0);
31333123

3134-
FAIL() << "BUG#33149565 is fixed";
3135-
} catch (const mysqlx::Error &) {
3136-
std::cout << "Throws untill BUG#33149565 is fixed." << std::endl;
3137-
}
3124+
docs = cFind.execute();
3125+
check_ps("my_age", 1);
3126+
check_ps("my_age", 1);
3127+
check_ps("= 6", 1);
31383128

31393129
/* Check multi fields */
31403130
cFind = coll.find("F1 like :F1 AND F2 > :F2").fields("F1 as my_F1");

0 commit comments

Comments
 (0)