Using \uncover inside a TikZ node text
You need another set of braces:
\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\begin{frame}
\begin{tikzpicture}[node distance=2cm]
\node[align=center] (a) {test 1 \\ {\uncover<2>{test 12345}}}; %wrapped \uncover into {}
\node[align=center,right of=a] (b) {test 2};
\path[->] (a) edge (b);
\end{tikzpicture}
\end{frame}
\end{document}
\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\begin{frame}
\begin{tikzpicture}[node distance=2cm]
\onslide<1>{%
\node[align=center] (a) {test 1 \\ \phantom{test 12345}};}
\onslide<2->{%
\node[align=center] (a) {test 1 \\ test 12345};}
\node[align=center,right of=a] (b) {test 2};
\path[->] (a) edge (b);
\end{tikzpicture}
\end{frame}
\end{document}