def wait_for_import(self, connection_id, wait_interval):
        """
        Wait until connection state is no longer ``IMPORT_CONFIGURATION``.

        Args:
            connection_id (str): Heroku Connect connection to monitor.
            wait_interval (int): How frequently to poll in seconds.

        Raises:
            CommandError: If fetch connection information fails.

        """
        self.stdout.write(self.style.NOTICE('Waiting for import'), ending='')
        state = utils.ConnectionStates.IMPORT_CONFIGURATION
        while state == utils.ConnectionStates.IMPORT_CONFIGURATION:
            # before you get the first state, the API can be a bit behind
            self.stdout.write(self.style.NOTICE('.'), ending='')
            time.sleep(wait_interval)  # take a breath
            try:
                connection = utils.get_connection(connection_id)
            except requests.HTTPError as e:
                raise CommandError("Failed to fetch connection information.") from e
            else:
                state = connection['state']
        self.stdout.write(self.style.NOTICE(' Done!'))