Static and dynamic polarizabilities of alkaline earth metal atoms Be-Ba and of the Yb atom, as well as dispersion coefficients and retardation functions for their long-range interactions, are used as a benchmark for the restricted coupled cluster method with singles and doubles (CCSD) and noniterative triples added [CCSD(T)] and related polarization propagator CCSD(3) methods at the complete basis set limit. The latter is attained through the sequence of the augmented correlation-consistent polarized weighted core valence n-zeta basis sets with the exact 2-component approximation for the scalar relativistic effects and with the small-core effective core potentials (for Ca, Sr, and Ba). At the converged level of core correlation treatment, the finite-field CCSD(T) method reproduces the best available data for the static dipole and quadrupole polarizabilities better than 1% and 4%, respectively. Systematic cancelation of the triple contribution in the CCSD(3) calculations of the dynamic polarizabilities of alkaline earth metal atoms makes their dispersion coefficients accurate within 3%. The retardation functions are computed and used for the analysis of the long-range interactions in the homonuclear dimers. Implications to accurate ab initio calculations of the global interaction potentials are discussed.