added onstream end test