Index: openacs-4/packages/acs-content-repository/tcl/test/content-search-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/test/content-search-procs.tcl,v diff -u -r1.6.2.1 -r1.6.2.2 --- openacs-4/packages/acs-content-repository/tcl/test/content-search-procs.tcl 15 Feb 2021 17:53:27 -0000 1.6.2.1 +++ openacs-4/packages/acs-content-repository/tcl/test/content-search-procs.tcl 3 Mar 2021 13:04:57 -0000 1.6.2.2 @@ -13,7 +13,7 @@ } { aa_false "Revision ${revision_id} is not queued for search events $events" \ [db_string check_queue [subst { - select count(*) from search_observer_queue + select count(*) from search_observer_queue where object_id = :revision_id and event in ([template::util::tcl_to_sql_list $events]) @@ -26,14 +26,14 @@ } { We use this test many times. Check if revision_id is in the search observer queue - + @param events List of events to check for (INSERT,UPDATE,DELETE) } { aa_true "Revision ${revision_id} is queued for search events $events" \ [db_string check_queue [subst { - select count(*) from search_observer_queue + select count(*) from search_observer_queue where object_id = :revision_id - and event in + and event in ([template::util::tcl_to_sql_list $events]) }] -default 0] } @@ -103,25 +103,25 @@ aa_true "But a revision exists" {$latest_revision ne ""} aa_false "Item is NOT queued for search indexing" \ [db_string check_queue { - select 1 from search_observer_queue + select 1 from search_observer_queue where object_id = :latest_revision } -default 0] - + aa_log "Update Item, still no live revision" content::item::update \ -item_id $item_id \ -attributes [list [list name $item_name]] cr_item_search::assert_not_in_queue \ -revision_id $latest_revision \ -events [list INSERT UPDATE] - + aa_log "Set live revision no publish date" content::item::set_live_revision \ -revision_id $latest_revision cr_item_search::assert_in_queue \ -revision_id $latest_revision \ -events [list INSERT UPDATE] - + content::item::unset_live_revision -item_id $item_id cr_item_search::assert_in_queue \ -revision_id $latest_revision \