Does it need the same sample rate for training and testing speaker recognition system?
I suppose that you are asking whether or not the difference in sampling frequency ($Fs$) will affect your classification result.
The short answer is "It depends on the data". The slightly longer answer is:
The $Fs$ has a direct impact on the captured bandwidth. At 8kHz, you are capturing (nominally) 0-4kHz. At 16kHz, you are capturing (nominally) 0-8kHz.
Speaker recognition is essentially trying to discriminate between the spectral differences in the sound of different speakers.
Therefore, a trivial example is one where if your $Fs$ is 8kHz and the key variation of spectral differences occurs between 6-7kHz, then your classifier will completely fail to discriminate between its classes.
Another detail is being sure that the $Fs$ is suitable, i.e. it includes the frequency range of interest, but, the recordings are awful and some other sound source is masking the range of frequencies the classifier depends on.
Therefore, "It depends on the data".
But, if we assume that the recordings are not problematic and a lower $Fs$ does indeed contain the frequency band of interest, then what might be worth considering more is the size of the transforms that are involved in the derivation of the MFCC that your classifier depends on. In other words, lowering the $Fs$ might require that you increase the length of the transforms to maintain the same (or similar) frequency resolution. Otherwise, adjacent frequency bins might get lumped together and reduce the clarity of the observed spectrum.
Finally, a more practical note would be to make sure that any existing code you might be using does not contain hard coded $Fs$. If the original author has assumed a fixed $Fs$ throughout the implementation of the model, it is likely that the classifier will have unpredictable behaviour if you feed it with sound files of different characteristics.
Hope this helps.