Flaky Tests in a Large Industrial Database Management System: An Empirical Study of Fixed Issue Reports for SAP HANA
Alexander Berndt, Thomas Bach, Sebastian Baltes
TL;DR
This study addresses flaky tests in a large industrial DBMS (SAP HANA) by using LLMs-as-annotators to label issue reports with root-cause categories. It finds concurrency to be the dominant root cause (23%) and reveals test-type differences, with system tests showing more timeouts and unit tests more platform- and isolation-related flakiness. The approach achieves substantial model-model (κ=0.78) and model-human (κ=0.63) agreement, supporting scalable, large-scale analysis, and uncovers temporal trends such as rising Async Wait and a post-change drop in timeouts. The work highlights the value of multi-label root-cause analysis for understanding complex flakiness and informs future mitigation strategies in industrial contexts.
Abstract
Flaky tests yield different results when executed multiple times for the same version of the source code. Thus, they provide an ambiguous signal about the quality of the code and interfere with the automated assessment of code changes. While a variety of factors can cause test flakiness, approaches to fix flaky tests are typically tailored to address specific causes. However, the prevalent root causes of flaky tests can vary depending on the programming language, application domain, or size of the software project. Since manually labeling flaky tests is time-consuming and tedious, this work proposes an LLMs-as-annotators approach that leverages intra- and inter-model consistency to label issue reports related to fixed flakiness issues with the relevant root cause category. This allows us to gain an overview of prevalent flakiness categories in the issue reports. We evaluated our labeling approach in the context of SAP HANA, a large industrial database management system. Our results suggest that SAP HANA's tests most commonly suffer from issues related to concurrency (23%, 130 of 559 analyzed issue reports). Moreover, our results suggest that different test types face different flakiness challenges. Therefore, we encourage future research on flakiness mitigation to consider evaluating the generalizability of proposed approaches across different test types.
