By the duration of the siren - even during the test, it does not exceed 3 minutes. Of course, there is an option that the signal does not stop due to a breakdown - I remember such a case in my city, the siren closest to the house sounded for about 5 minutes. If you live in a large city, then in this case, pay attention to the sirens of neighboring areas - in case of emergency they will continue to work as well. And, as mentioned in the other answers, pay attention to the media, in case of danger they will broadcast the necessary information.
Something similar has already been asked: https://thequestion.ru/questions/120526/vot-vy-sidite-sebe-spokoino-doma-vdrug-razdaetsya-voennaya-sirena-chto-delat-v-takikh-sluchayakh
Quite simply, the public warning system includes a set of measures, and not just the inclusion of a siren on the street. So if you were not informed about the training launch, then it is enough to turn on the TV or radio, if the siren is not training, you will see or hear a message that will contain all the information you need, what happened and what you should do now. If after the siren you have the opportunity to watch your favorite TV series, then everything is in order.