Recreating I2C Wire.endTransmission() hangup

I know about the issue where Wire.endTransmission() doesn't have a timeout. I have a project with one Arduino acting as the master and a second Arduino acting as a slave and have encountered this issue periodically. I'd like to solve it which I plan to do by implementing the alternative I2C library. However before I do this I'd like to re-create the issue so I 100% know my solution has fixed the issue. I've tried to make the master Arduino timeout by having nothing connected and sending data on the I2C bus but that appears to not cause a hangup. How can I intentionally cause the Arduino to hang? I've tried searching and using other people's code who had this issue but my code always seems to work.

Here's the sample code I'm running on the master with no slaves attached:

#include <Wire.h>
 
void setup(){
 
 Serial.begin(9600);
 Wire.begin();

 Wire.beginTransmission(5);
 Wire.write("Hello World");
 Wire.endTransmission();

 Serial.println("End of setup");
}


void loop(){
 Serial.println("Loop");
 delay(1000);
}

I grounded the SDA and SCL pins and it caused the hangup I was looking for.

gz4GA:
I've tried to make the master Arduino timeout by having nothing connected and sending data on the I2C bus but that appears to not cause a hangup. How can I intentionally cause the Arduino to hang? I've tried searching and using other people's code who had this issue but my code always seems to work.

I think you will have to connect faulty hardware to the I2C bus.
Hardware that pulls the bus voltage to LOW level and never releases the bus.

Perhaps a 470 Ohm resistor pulling one, the other or both I2C lines to LOW.