Centuries might be pushing it, but it can take a long time in some circumstances.
It's much easier under ideal circumstances, for example where there is a longer standing shared culture, where the people are more highly educated and sophisticated, where there is a common language or the newcomers speak the new language well, where there is shared religion. For example.
Also, it's a big difference if the community becomes a kind of enclave, or integrates more fully in terms of social life, where they live, marriage, etc.
In many cases in the recent past you are seeing typically people with some connections, like language, western styles of government and education, and shared religion. And also often well educated people who are coming to work. That's a best case scenario for integration.
But the more differernt people are, and more insular, the more difficult integration is, and the more effort and resources it takes.
Even in a best case scenario very high levels of immigration will cause stress on communities and potentially outstrip the resources required, which are not only economic but social.