This is described in Śrīmad-Bhāgavatam (Bhāgavata Purāṇa): Skandha 10: Adhyay 88:
SB 10.88.1 — King Parīkṣit said: Those demigods, demons and humans who worship Lord Śiva, a strict renunciant, usually enjoy wealth and sense gratification, while the worshipers of the Supreme Lord Hari, the husband of the goddess of fortune, do not.
Śrī Śukadeva replied that same question was asked by Yudhiṣṭhira and Śrī Kṛṣṇa answered as below:
SB 10.88.8 — The Personality of Godhead said: If I especially favor someone, I gradually deprive him of his wealth. Then the relatives and friends of such a poverty-stricken man abandon him. In this way he suffers one distress after another.
SB 10.88.9 — When he becomes frustrated in his attempts to make money and instead befriends My devotees, I bestow My special mercy upon him.
SB 10.88.10 — A person who has thus become sober fully realizes the Absolute as the highest truth, the most subtle and perfect manifestation of spirit, the transcendental existence without end. In this way realizing that the Supreme Truth is the foundation of his own existence, he is freed from the cycle of material life.
SB 10.88.11 — Because I am difficult to worship, people generally avoid Me and instead worship other deities, who are quickly satisfied. When people receive kingly opulences from these deities, they become arrogant, intoxicated with pride and neglectful of their duties. They dare to offend even the demigods who have bestowed benedictions upon them.
So, Lord Vishnu first test his devotees properly and then grant them boons. In other hand, Lord Shiva quickly gets pleased (hence known as Ashutosh) and grant boons. The story of Vṛkāsura is mentioned in same chapter of Bhagvatam to explain this.
Related