testing case sort_index with pd.set_option('use_inf_as_na', True)
- [ ] closes #29687
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Create test cases for sort_index works with 'pd.set_option('mode.use_inf_as_na',True)
