The violence also threatens to strain China 's close relationship with Myanmar 's military junta , which has been trying to consolidate control over several armed ethnic groups along its borders to ensure next year 's national elections , its first in nearly 20 years , go smoothly .