fixed the test cases in upstream.t