You could try to use the environment variable described here:
i.e.
CATALOG_OPTIMIZATION_DISABLED=y ./bin/test
Or, you could manually process the queue:
from Products.CMFCore.indexing import processQueue
... do some operations that will trigger catalog indexing operations
...
processQueue() check that the operations took place