Skip to content

Commit abb763d

Browse files
committed
test(runtime): fail the leak probe's settling spec on any unsettled wrapper
The spec allowed the second probe up to 49 more leaked objects than the first, so it caught only a batch that stayed unsettled as a whole. Nothing between the two probes but the batch itself creates wrappers, so the second probe must not report more than the first.
1 parent aba8de6 commit abb763d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎test-app/app/src/main/assets/app/tests/testWrapperLifetimeLeaks.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,6 @@ describe("Wrapper lifetime leak probe", function () {
213213
}
214214
})();
215215
// Read as leaked if unsettled: their Java objects are still held for them.
216-
expect(runtime.findLeakCycles().leaked).toBeLessThan(report.leaked + 50);
216+
expect(runtime.findLeakCycles().leaked).toBeLessThanOrEqual(report.leaked);
217217
}, 20000);
218218
});

0 commit comments

Comments
 (0)