The paper deals with the scheduling problem of minimizing the makespan in the two-machine n-job flow-shop with w non-availability intervals on each of the two machines. This problem is binary NP-hard even if there is only one non-availability interval (w = 1) either on the first machine or on the second machine. If there are no non-availability intervals on any machine ( = 0), the two-machine flow-shop problem may be easily solved using Johnson's permutation of n jobs. We derived sufficient conditions for optimality of Johnson's permutation in the case of the given w ≥ 1 non-availability intervals. The instrument we use is stability analysis, which answers the question of how stable an optimal schedule is if there are independent changes in the processing times of the jobs. The stability analysis is demonstrated on a huge number of randomly generated two-machine flow-shop problems with 5 ≤ n ≤ 10 000 and 1 ≤ w ≤ 1000.