The cooler lines could be disconnected, one radiator hole plugged with a pipe plug, etc, and low pressure (low being the operative word) compressed air applied to the other hole. If the cooler is leaking the engine coolant should show some bubbles.
FYI, the heat treatment process does not cause porosity in aluminum castings. Three things cause porosity, not enough aluminum in the ladle, contaminated sodium or a cooling problem in the mold. Aluminum castings need a high riser to keep pressure on the aluminum while it is solidifying. The molds are insulated and a coolant is pumped through them to start the solidification from the bottom to the top. If there isn’t enough liquid metal over the area solidifying, then the solid part shrinks and porosity is formed.
Just before pouring the aluminum from the ladle to the mold, a specified amount of pure sodium is added. The sodium is contined in a sealed aluminum foil pack, the foil melts and releases the sodium just before the pour.
These problems almost never leave the factory though. They are easy to spot for the trained eye and the castings go through extensive pressure testing after each level of machining.